lbaas-member-update weight property does not reflect in haproxy config file

Bug #1549173 reported by Paco Peng on 2016-02-24
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
octavia
Fix Released
High
Unassigned

Bug Description

when to update the weight of members, it does not refelect in the haproxy config consistently .please check below two case for more details.

Case 1: update one property in one command
##list the initial member status
stack@nsj29:~$ neutron lbaas-member-list 199110de-f8b5-4696-a45f-fce2fa3d35e4
+--------------------------------------+--------+------------+---------------+--------+--------------------------------------+----------------+
| id | name | address | protocol_port | weight | subnet_id | admin_state_up |
+--------------------------------------+--------+------------+---------------+--------+--------------------------------------+----------------+
| 4dd3f086-dff7-4cdc-96e4-5008822fb33c | node01 | 10.0.0.121 | 80 | 1 | 92460cf7-ffcd-462a-b7d1-01f8a69766ae | False |
| 253cf421-c03b-47a4-a05f-5c0e7e1587bf | node2 | 10.0.0.122 | 80 | 1 | 92460cf7-ffcd-462a-b7d1-01f8a69766ae | False |
+--------------------------------------+--------+------------+---------------+--------+--------------------------------------+----------------+

##record the initial config of haproxy
backend 199110de-f8b5-4696-a45f-fce2fa3d35e4
    mode http
    balance roundrobin
    stick-table type ip size 10k
    stick on src
    option forwardfor
    server 4dd3f086-dff7-4cdc-96e4-5008822fb33c 10.0.0.121:80 weight 1
    server 253cf421-c03b-47a4-a05f-5c0e7e1587bf 10.0.0.122:80 weight 1
##take a update action on node01
stack@nsj29:~$ neutron lbaas-member-update 4dd3f086-dff7-4cdc-96e4-5008822fb33c 199110de-f8b5-4696-a45f-fce2fa3d35e4 --weight=10
Updated member: 4dd3f086-dff7-4cdc-96e4-5008822fb33c
##take a update action on node2
stack@nsj29:~$ neutron lbaas-member-update 253cf421-c03b-47a4-a05f-5c0e7e1587bf 199110de-f8b5-4696-a45f-fce2fa3d35e4 --weight=10
Updated member: 253cf421-c03b-47a4-a05f-5c0e7e1587bf

##wait for 2~3 minutes, check the haproxy configuration
cat /var/lib/octavia/294489f1-9e48-4a83-8840-b28e212fad06/haproxy.cfg
............#skipped useless line
backend 199110de-f8b5-4696-a45f-fce2fa3d35e4
    mode http
    balance roundrobin
    stick-table type ip size 10k
    stick on src
    option forwardfor
    server 4dd3f086-dff7-4cdc-96e4-5008822fb33c 10.0.0.121:80 weight 10
    server 253cf421-c03b-47a4-a05f-5c0e7e1587bf 10.0.0.122:80 weight 1

##Rerun the update command on node2
stack@nsj29:~$ neutron lbaas-member-update 253cf421-c03b-47a4-a05f-5c0e7e1587bf 199110de-f8b5-4696-a45f-fce2fa3d35e4 --weight=10
Updated member: 253cf421-c03b-47a4-a05f-5c0e7e1587bf

##check the haproxy configuration,this time it will record the change in haproxy config
backend 199110de-f8b5-4696-a45f-fce2fa3d35e4
    mode http
    balance roundrobin
    stick-table type ip size 10k
    stick on src
    option forwardfor
    server 4dd3f086-dff7-4cdc-96e4-5008822fb33c 10.0.0.121:80 weight 10
    server 253cf421-c03b-47a4-a05f-5c0e7e1587bf 10.0.0.122:80 weight 10

Case 2: update two update properties in one command
##initial memeber status
stack@nsj29:~$ neutron lbaas-member-list 199110de-f8b5-4696-a45f-fce2fa3d35e4
+--------------------------------------+--------+------------+---------------+--------+--------------------------------------+----------------+
| id | name | address | protocol_port | weight | subnet_id | admin_state_up |
+--------------------------------------+--------+------------+---------------+--------+--------------------------------------+----------------+
| 4dd3f086-dff7-4cdc-96e4-5008822fb33c | node01 | 10.0.0.121 | 80 | 10 | 92460cf7-ffcd-462a-b7d1-01f8a69766ae | False |
| 253cf421-c03b-47a4-a05f-5c0e7e1587bf | node02 | 10.0.0.122 | 80 | 10 | 92460cf7-ffcd-462a-b7d1-01f8a69766ae | False |
+--------------------------------------+--------+------------+---------------+--------+--------------------------------------+----------------+
## update on node01
stack@nsj29:~$ neutron lbaas-member-update 4dd3f086-dff7-4cdc-96e4-5008822fb33c 199110de-f8b5-4696-a45f-fce2fa3d35e4 --weight=20 --name node01
Updated member: 4dd3f086-dff7-4cdc-96e4-5008822fb33c

##check the haproxy configuration, nothing changed in the haproxy file
backend 199110de-f8b5-4696-a45f-fce2fa3d35e4
    mode http
    balance roundrobin
    stick-table type ip size 10k
    stick on src
    option forwardfor
    server 4dd3f086-dff7-4cdc-96e4-5008822fb33c 10.0.0.121:80 weight 10
    server 253cf421-c03b-47a4-a05f-5c0e7e1587bf 10.0.0.122:80 weight 10

##take update on node02
stack@nsj29:~$ neutron lbaas-member-update 253cf421-c03b-47a4-a05f-5c0e7e1587bf 199110de-f8b5-4696-a45f-fce2fa3d35e4 --weight=20 --name node02
Updated member: 253cf421-c03b-47a4-a05f-5c0e7e1587bf

##check the haproxy configuration,it will take the previouse command's result into haproxy configure , not the latest command
backend 199110de-f8b5-4696-a45f-fce2fa3d35e4
    mode http
    balance roundrobin
    stick-table type ip size 10k
    stick on src
    option forwardfor
    server 4dd3f086-dff7-4cdc-96e4-5008822fb33c 10.0.0.121:80 weight 20
    server 253cf421-c03b-47a4-a05f-5c0e7e1587bf 10.0.0.122:80 weight 10

Michael Johnson (johnsom) wrote :
Changed in octavia:
status: New → Fix Released
importance: Undecided → High
Bhaargavi Natarajan (bnatara) wrote :

Verified in the build taken from master on Feb 25, 2016. Issue does not appear.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers