a10networks / a10-neutron-lbaas

A10 Networks, Openstack Neutron LBaaS Driver
Apache License 2.0
9 stars 19 forks source link

Backport health-monitor changes to 1.3 series drivers #152

Open Cedev opened 8 years ago

Cedev commented 8 years ago

We're having problems with the 1.4 series driver on icehouse. I think the migration code tries to load lbaas v2 code regardless of whether lbaasv2 is present.

Backport the health monitor changes to 1.3 so they can be used with icehouse.

Cedev commented 8 years ago

Sniff tested with lbaasv1 and lbaasv2 using 2.7.2 and 4.1 boxes.

When lbaasv1 tries to disassociate a health monitor from a 4.1 box, it doesn't. We send

POST /axapi/v3/slb/service-group/4b0652e5-760a-43ac-9ff9-09446c767f29 HTTP/1.1
Host: 10.48.5.198
Content-Length: 94
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: ACOS-Client-AGENT-1.2.7
Connection: keep-alive
Content-type: application/json
Authorization: A10 491b9e02267d5a3fe8b06b41ec517d

{"service-group": {"health-check-disable": 0, "name": "4b0652e5-760a-43ac-9ff9-09446c767f29"}}

This is generated from the call

        c.client.slb.service_group.update(pool_name, health_monitor="",
                                          health_monitor_disabled=True)

The box responds with

{
    "service-group": {
        "reset-on-server-selection-fail": 0,
        "protocol": "tcp",
        "name": "4b0652e5-760a-43ac-9ff9-09446c767f29",
        "backup-server-event-log": 0,
        "traffic-replication-mirror-sa-da-repl": 0,
        "uuid": "274aad54-a2ad-11e5-9344-fa163e04a247",
        "stats-data-action": "stats-data-enable",
        "sample-rsp-time": 0,
        "traffic-replication-mirror-ip-repl": 0,
        "lb-method": "round-robin",
        "stateless-auto-switch": 0,
        "member-list": [
            {
                "member-priority": 1,
                "uuid": "2a3c54cc-a2ad-11e5-9344-fa163e04a247",
                "name": "_0203f_1_2_3_4_neutron",
                "a10-url": "/axapi/v3/slb/service-group/4b0652e5-760a-43ac-9ff9-09446c767f29/member/_0203f_1_2_3_4_neutron+80",
                "member-state": "enable",
                "port": 80,
                "member-stats-data-disable": 1
            }
        ],
        "priority-affinity": 0,
        "traffic-replication-mirror-da-repl": 0,
        "extended-stats": 0,
        "traffic-replication-mirror": 0,
        "health-check": "fa08674b-f11a-4975-81e7-5094",
        "traffic-replication-mirror-sa-repl": 0
    }
}

The service group is still associated with the health-check.

I suspect that disassociating a health monitor from a service group in the 3.0 api is different than in the 2.1 api and the same error exists in master too.

Cedev commented 8 years ago

The same issue exists in master. #155