change admin state up for loadbalancer twice caused loadbalancer provisioning status to go to PENDING_UPDATE

Bug #1549036 reported by Bhaargavi Natarajan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
octavia
Fix Released
Critical
Bharath

Bug Description

Devstack all in one setup with no active/standby

Loadbalancer provisioning status goes to PENDING_UPDATE when the admin-state-up is updated two times and there are two listeners attached to the LoadBalancer.

Steps to re-create:
1. Created a loadbalancer and created 2 listeners (with ports 80 and 22) for the loadbalancer.
2. Loadbalancer is listed with the 2 listeners.
3. Updated the admin state up for the loadbalancer to FALSE. Loadbalancer is updated and is in ACTIVE status.
4. Updated the loadbalancer admin state up to TRUE. Loadbalancer provisioning status remains in PENDING_UPDATE status.

neutron lbaas-loadbalancer-show LB4
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| admin_state_up | True |
| description | |
| id | 555fff7e-4f41-4ff6-b69a-0ff188f0e811 |
| listeners | |
| name | LB4 |
| operating_status | ONLINE |
| pools | |
| provider | octavia |
| provisioning_status | ACTIVE |
| tenant_id | 4cc6946175474fe7b7536944ee8de5ba |
| vip_address | 8.0.0.105 |
| vip_port_id | 8c455402-67b4-4ddd-a222-e118ac318a06 |
| vip_subnet_id | b4848552-59a2-4962-a29f-8b3606bdca6f |
+---------------------+--------------------------------------+
stack@paco-kilo02:~/devstack$ neutron lbaas-listener-create --connection-limit 2 --description "This is the first listener for the LB4" --name Listener01 --loadbalancer Lb4 --protocol HTTP --protocol-port 80
Created a new listener:
+---------------------------+------------------------------------------------+
| Field | Value |
+---------------------------+------------------------------------------------+
| admin_state_up | True |
| connection_limit | 2 |
| default_pool_id | |
| default_tls_container_ref | |
| description | This is the first listener for the LB4 |
| id | 92d4e43a-ba92-464b-b328-14a0b848b0cf |
| loadbalancers | {"id": "555fff7e-4f41-4ff6-b69a-0ff188f0e811"} |
| name | Listener01 |
| protocol | HTTP |
| protocol_port | 80 |
| sni_container_refs | |
| tenant_id | 4cc6946175474fe7b7536944ee8de5ba |
+---------------------------+------------------------------------------------+
stack@paco-kilo02:~/devstack$ neutron lbaas-listener-create --connection-limit 2 --description "This is the second listener for the LB4" --name Listener02 --loadbalancer Lb4 --protocol TCP --protocol-port 22
Created a new listener:
+---------------------------+------------------------------------------------+
| Field | Value |
+---------------------------+------------------------------------------------+
| admin_state_up | True |
| connection_limit | 2 |
| default_pool_id | |
| default_tls_container_ref | |
| description | This is the second listener for the LB4 |
| id | f726a49a-53e7-4104-a410-be3daedffb31 |
| loadbalancers | {"id": "555fff7e-4f41-4ff6-b69a-0ff188f0e811"} |
| name | Listener02 |
| protocol | TCP |
| protocol_port | 22 |
| sni_container_refs | |
| tenant_id | 4cc6946175474fe7b7536944ee8de5ba |
+---------------------------+------------------------------------------------+

stack@paco-kilo02:~/devstack$ neutron lbaas-loadbalancer-show LB4
+---------------------+------------------------------------------------+
| Field | Value |
+---------------------+------------------------------------------------+
| admin_state_up | True |
| description | |
| id | 555fff7e-4f41-4ff6-b69a-0ff188f0e811 |
| listeners | {"id": "92d4e43a-ba92-464b-b328-14a0b848b0cf"} |
| | {"id": "f726a49a-53e7-4104-a410-be3daedffb31"} |
| name | LB4 |
| operating_status | ONLINE |
| pools | |
| provider | octavia |
| provisioning_status | ACTIVE |
| tenant_id | 4cc6946175474fe7b7536944ee8de5ba |
| vip_address | 8.0.0.105 |
| vip_port_id | 8c455402-67b4-4ddd-a222-e118ac318a06 |
| vip_subnet_id | b4848552-59a2-4962-a29f-8b3606bdca6f |
+---------------------+------------------------------------------------+
stack@paco-kilo02:~/devstack$ neutron lbaas-loadbalancer-update LB4 --admin-state-up FALSE
Updated loadbalancer: LB4
stack@paco-kilo02:~/devstack$ neutron lbaas-loadbalancer-show LB4
+---------------------+------------------------------------------------+
| Field | Value |
+---------------------+------------------------------------------------+
| admin_state_up | False |
| description | |
| id | 555fff7e-4f41-4ff6-b69a-0ff188f0e811 |
| listeners | {"id": "92d4e43a-ba92-464b-b328-14a0b848b0cf"} |
| | {"id": "f726a49a-53e7-4104-a410-be3daedffb31"} |
| name | LB4 |
| operating_status | ONLINE |
| pools | |
| provider | octavia |
| provisioning_status | ACTIVE |
| tenant_id | 4cc6946175474fe7b7536944ee8de5ba |
| vip_address | 8.0.0.105 |
| vip_port_id | 8c455402-67b4-4ddd-a222-e118ac318a06 |
| vip_subnet_id | b4848552-59a2-4962-a29f-8b3606bdca6f |
+---------------------+------------------------------------------------+
stack@paco-kilo02:~/devstack$ neutron lbaas-loadbalancer-update LB4 --admin-state-up
Updated loadbalancer: LB4
stack@paco-kilo02:~/devstack$ neutron lbaas-loadbalancer-show LB4
+---------------------+------------------------------------------------+
| Field | Value |
+---------------------+------------------------------------------------+
| admin_state_up | True |
| description | |
| id | 555fff7e-4f41-4ff6-b69a-0ff188f0e811 |
| listeners | {"id": "92d4e43a-ba92-464b-b328-14a0b848b0cf"} |
| | {"id": "f726a49a-53e7-4104-a410-be3daedffb31"} |
| name | LB4 |
| operating_status | ONLINE |
| pools | |
| provider | octavia |
| provisioning_status | PENDING_UPDATE |
| tenant_id | 4cc6946175474fe7b7536944ee8de5ba |
| vip_address | 8.0.0.105 |
| vip_port_id | 8c455402-67b4-4ddd-a222-e118ac318a06 |
| vip_subnet_id | b4848552-59a2-4962-a29f-8b3606bdca6f |
+---------------------+------------------------------------------------+

Changed in octavia:
importance: Undecided → Critical
tags: added: target-mitaka
description: updated
Changed in octavia:
assignee: nobody → Bharath (bharathm)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to octavia (master)

Reviewed: https://review.openstack.org/290408
Committed: https://git.openstack.org/cgit/openstack/octavia/commit/?id=ecfca348904560c341e84644137b9c0aa09b3949
Submitter: Jenkins
Branch: master

commit ecfca348904560c341e84644137b9c0aa09b3949
Author: Bharath M <email address hidden>
Date: Wed Mar 9 03:16:25 2016 -0800

    Fix admin-state-up

    While updating the admin-state-up of LB, Listener, Pool,
    or member the update fails due to the wrong order of the
    positional parameters.

    This leads to SQL syntax error and eventually
    Loadbalancer gets stuck in PENDING_UPDATE provisioning
    status.

    The haproxy jinja was not taking into account if objects
    were enabled or not.

    This patch fixes the above issue.

    This patch also adds the OpenFixture class from neutron
    to enable safer mocks of os.open. This was needed for the
    test of this code.

    Co-Authored-By: Michael Johnson <email address hidden>
    Closes-Bug: #1547123
    Closes-Bug: #1549036
    Closes-Bug: #1549186
    Closes-Bug: #1552098
    Change-Id: Id5733cc8e26ec7092b821c2c18c41696d6789265

Changed in octavia:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.