neutron-lbaas V2 lbaas-member-list returns all members, not just those for the specified pool

Bug #1483100 reported by Al Miller
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Brandon Logan

Bug Description

Boot 4 webserver instances.
Create two loadbalancer stacks:

lb1/listener1/pool1/[member1,member2]
lb2/listener2/pool2/[member3,member4]

Do "neutron lbaas-member-list pool1" and you will get all 4 instances. Likewise, "neutron lbaas-member-list pool2" will return the same 4 instances.

The pool_id is being properly provided to the LBaaS API by the neutron client, but is not being assigned to the filter on the DB query.

Al Miller (al-miller)
Changed in neutron:
assignee: nobody → Al Miller (al-miller)
description: updated
Revision history for this message
Al Miller (al-miller) wrote :
Download full text (6.2 KiB)

    neutron lbaas-loadbalancer-create --name lb1 ${SUBNET_NAME}
    neutron lbaas-loadbalancer-create --name lb2 ${SUBNET_NAME}
    neutron lbaas-listener-create --loadbalancer lb1 --protocol HTTP --protocol-port 80 --name listener1
    neutron lbaas-listener-create --loadbalancer lb2 --protocol HTTP --protocol-port 80 --name listener2

    neutron lbaas-pool-create --lb-algorithm ROUND_ROBIN --listener listener1 --protocol HTTP --name pool1
    neutron lbaas-pool-create --lb-algorithm ROUND_ROBIN --listener listener2 --protocol HTTP --name pool2

    neutron lbaas-member-create --subnet ${SUBNET_NAME} --address ${IP1} --protocol-port 80 pool1
    neutron lbaas-member-create --subnet ${SUBNET_NAME} --address ${IP2} --protocol-port 80 pool1

    neutron lbaas-member-create --subnet ${SUBNET_NAME} --address ${IP3} --protocol-port 80 pool2
    neutron lbaas-member-create --subnet ${SUBNET_NAME} --address ${IP4} --protocol-port 80 pool2

ubuntu@devstack1:~/devstack$ nova list
+--------------------------------------+-------+--------+------------+-------------+--------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+--------+------------+-------------+--------------------------------------------------------+
| 9c015292-e41c-48ce-a301-fdd7e44c3b81 | node1 | ACTIVE | - | Running | private=fd18:1a78:8e53:0:f816:3eff:fe62:a363, 10.0.0.4 |
| 83ec028e-b5bc-4069-885f-85e4840c1910 | node2 | ACTIVE | - | Running | private=fd18:1a78:8e53:0:f816:3eff:fe0f:694b, 10.0.0.5 |
| 114a0929-b665-46a6-bdac-98e2ac747030 | node3 | ACTIVE | - | Running | private=fd18:1a78:8e53:0:f816:3eff:feb0:904a, 10.0.0.6 |
| c396edab-b902-4fa4-9af1-df0860948fb3 | node4 | ACTIVE | - | Running | private=fd18:1a78:8e53:0:f816:3eff:fe4d:4b10, 10.0.0.7 |
+--------------------------------------+-------+--------+------------+-------------+--------------------------------------------------------+
ubuntu@devstack1:~/devstack$ neutron lbaas-loadbalancer-list
+--------------------------------------+------+-------------+---------------------+----------+
| id | name | vip_address | provisioning_status | provider |
+--------------------------------------+------+-------------+---------------------+----------+
| 43505db3-d692-47af-ae92-dd0572d7a963 | lb2 | 10.0.0.9 | ACTIVE | haproxy |
| e16bcc14-82d7-4120-b744-b9be2ca02d24 | lb1 | 10.0.0.8 | ACTIVE | haproxy |
+--------------------------------------+------+-------------+---------------------+----------+

ubuntu@devstack1:~/devstack$ neutron lbaas-listener-list
+--------------------------------------+--------------------------------------+-----------+----------+---------------+----------------+
| id | default_pool_id | name | protocol | protocol_port | admin_state_up |
+--------------------------------------+--------------------------------------+-----------+----------+---------...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-lbaas (master)

Fix proposed to branch: master
Review: https://review.openstack.org/210968

Changed in neutron:
status: New → In Progress
Revision history for this message
Al Miller (al-miller) wrote :

After applying the change in patch set 2 of https://review.openstack.org/210968 the behavior is now correct:

ubuntu@devstack1:~/devstack$ neutron lbaas-member-list pool1
+--------------------------------------+----------+---------------+--------+--------------------------------------+----------------+
| id | address | protocol_port | weight | subnet_id | admin_state_up |
+--------------------------------------+----------+---------------+--------+--------------------------------------+----------------+
| 54632752-9b04-4926-a567-0e0b2536d586 | 10.0.0.6 | 80 | 1 | fac4a28d-246b-4075-b2f8-c83ea3122d47 | True |
| 75aeef1c-d746-41c4-a1ff-ff9b0887eef1 | 10.0.0.7 | 80 | 1 | fac4a28d-246b-4075-b2f8-c83ea3122d47 | True |
+--------------------------------------+----------+---------------+--------+--------------------------------------+----------------+
ubuntu@devstack1:~/devstack$ neutron lbaas-member-list pool2
+--------------------------------------+----------+---------------+--------+--------------------------------------+----------------+
| id | address | protocol_port | weight | subnet_id | admin_state_up |
+--------------------------------------+----------+---------------+--------+--------------------------------------+----------------+
| e17923f5-3038-473c-affd-e25fcadc9b55 | 10.0.0.4 | 80 | 1 | fac4a28d-246b-4075-b2f8-c83ea3122d47 | True |
| 63d3e8fb-485c-4d5e-b1a1-00908454b6ea | 10.0.0.5 | 80 | 1 | fac4a28d-246b-4075-b2f8-c83ea3122d47 | True |
+--------------------------------------+----------+---------------+--------+--------------------------------------+----------------+

tags: added: lbaas liberty-rc-potential
Changed in neutron:
assignee: Al Miller (al-miller) → Brandon Logan (brandon-logan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-lbaas (master)

Reviewed: https://review.openstack.org/210968
Committed: https://git.openstack.org/cgit/openstack/neutron-lbaas/commit/?id=539c1e8c5b4762a7ab668c47aa212f85aaa4f376
Submitter: Jenkins
Branch: master

commit 539c1e8c5b4762a7ab668c47aa212f85aaa4f376
Author: ajmiller <email address hidden>
Date: Sun Aug 9 21:28:10 2015 -0700

    Filter get_pool_members to return members from the desired pool

    Calls to "neutron lbaas-member-list <pool_id>" are currently returning
    all members from every pool, not just those belonging to <pool_id>.
    There is no filter being passed to the database query for pool
    members.

    This fix creates a filter for <pool_id>.

    Change-Id: I206e5fca06e2e4322c42737a98a4cfa5c055101e
    Closes-Bug: #1483100
    Co-Authored-By: Brandon Logan <email address hidden>

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-lbaas (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/231497

Kyle Mestery (mestery)
Changed in neutron:
milestone: none → liberty-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-lbaas (stable/liberty)

Reviewed: https://review.openstack.org/231497
Committed: https://git.openstack.org/cgit/openstack/neutron-lbaas/commit/?id=b3460886cd8f37d9b961e2017eab593c3384a187
Submitter: Jenkins
Branch: stable/liberty

commit b3460886cd8f37d9b961e2017eab593c3384a187
Author: ajmiller <email address hidden>
Date: Sun Aug 9 21:28:10 2015 -0700

    Filter get_pool_members to return members from the desired pool

    Calls to "neutron lbaas-member-list <pool_id>" are currently returning
    all members from every pool, not just those belonging to <pool_id>.
    There is no filter being passed to the database query for pool
    members.

    This fix creates a filter for <pool_id>.

    Change-Id: I206e5fca06e2e4322c42737a98a4cfa5c055101e
    Closes-Bug: #1483100
    Co-Authored-By: Brandon Logan <email address hidden>
    (cherry picked from commit 539c1e8c5b4762a7ab668c47aa212f85aaa4f376)

tags: added: in-stable-liberty
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
P Ingle (pingle) wrote :

Is this going to be backported to stable-kilo branch?

tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-lbaas (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/233149

Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-rc2 → 7.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-lbaas (master)

Fix proposed to branch: master
Review: https://review.openstack.org/235311

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-lbaas (master)

Reviewed: https://review.openstack.org/235311
Committed: https://git.openstack.org/cgit/openstack/neutron-lbaas/commit/?id=fca804ba8d0d7c7e5c6de4cd4609d52f027beb6f
Submitter: Jenkins
Branch: master

commit dbbd69b184a247e81819cc32993b07664e6e0525
Author: Michael Johnson <email address hidden>
Date: Mon Sep 28 23:54:01 2015 +0000

    Update the devstack readme.md for Octavia as ref

    The readme.md in the devstack directory did not get updated
    for Octavia being the reference driver. This patch updates
    the document to enable the Octavia plugin.

    Closes-Bug: #1500656
    Change-Id: I39f9f9d060512c9b3af9dd08c413931f9b94cf78
    (cherry picked from commit 872b8a5446726acb6483329724a500abb582cdf6)

commit b3460886cd8f37d9b961e2017eab593c3384a187
Author: ajmiller <email address hidden>
Date: Sun Aug 9 21:28:10 2015 -0700

    Filter get_pool_members to return members from the desired pool

    Calls to "neutron lbaas-member-list <pool_id>" are currently returning
    all members from every pool, not just those belonging to <pool_id>.
    There is no filter being passed to the database query for pool
    members.

    This fix creates a filter for <pool_id>.

    Change-Id: I206e5fca06e2e4322c42737a98a4cfa5c055101e
    Closes-Bug: #1483100
    Co-Authored-By: Brandon Logan <email address hidden>
    (cherry picked from commit 539c1e8c5b4762a7ab668c47aa212f85aaa4f376)

commit aaa235010c23337ee146c5866c0d9fd7aa246653
Author: ptoohill1 <email address hidden>
Date: Fri Sep 4 14:54:48 2015 -0500

    Allow updating TLS refs

    A bug prevented updating of default_tls_container_ref and failing
    with a 503

    This bug uncovered a few other issues with null key checks
    and complaints if sni_container_refs were not provided.

    Change-Id: I636e9f78b38ba9f02d10a013bf56459cc2a723e1
    Closes-Bug: #1501505
    (cherry picked from commit b8c3978de696786615cd72f90c0858d1032d241b)

commit e3b86df84bc1dc85085b0975f10536fd157ca45e
Author: Henry Gessau <email address hidden>
Date: Sun Sep 27 16:03:25 2015 -0400

    Tag the alembic migration revisions for Liberty

    Previously when we had one repo with one alembic branch we would
    create a milestone revision on that single branch. Now we have
    multiple repos and expand/contract branches for each repo.

    So from now on we tag the final revision on every branch when we make
    a milestone release.

    Partial-Bug: #1499033

    Depends-On: I38623986dd574bec01fe147f9c6a747f3f512bb7

    Change-Id: I923b233d104aaef530ed0e68c8d79aa455214b67
    (cherry picked from commit e16fa11eed548f1b0420c843cb5d89e60184a9fc)

commit 62bdafdb688d63109bf1fe0f815ecd00d26cd4d4
Author: Ihar Hrachyshka <email address hidden>
Date: Fri Sep 25 13:02:20 2015 +0200

    Use stable/liberty branch for neutron dep

    Change-Id: Ie9469a3b936eb1849f10a96a99d9c09fe39a8fc5

commit fb2ed961fd4ce76d834c3a7121c39b11cae59b0e
Author: Ihar Hrachyshka <email address hidden>
Date: Thu Sep 24 17:13:31 2015 +0200

    Update defaultbranch in .gitreview to stable/liberty

    Change-Id: Ibad81f9e7dd81dcfb6770d703adcd1ddd8a3769b

Revision history for this message
P Ingle (pingle) wrote :

is review on backporting this to Kilo still underway, or is it just waiting to be merged?
Review: https://review.openstack.org/233149

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron-lbaas 8.0.0.0b1

This issue was fixed in the openstack/neutron-lbaas 8.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-lbaas (stable/kilo)

Reviewed: https://review.openstack.org/233149
Committed: https://git.openstack.org/cgit/openstack/neutron-lbaas/commit/?id=59e3a02cbe08542a0c32dd9a5b03a6c063c36262
Submitter: Jenkins
Branch: stable/kilo

commit 59e3a02cbe08542a0c32dd9a5b03a6c063c36262
Author: ajmiller <email address hidden>
Date: Sun Aug 9 21:28:10 2015 -0700

    Filter get_pool_members to return members from the desired pool

    Calls to "neutron lbaas-member-list <pool_id>" are currently returning
    all members from every pool, not just those belonging to <pool_id>.
    There is no filter being passed to the database query for pool
    members.

    This fix creates a filter for <pool_id>.

    Change-Id: I206e5fca06e2e4322c42737a98a4cfa5c055101e
    Closes-Bug: #1483100
    Co-Authored-By: Brandon Logan <email address hidden>
    (cherry picked from commit 539c1e8c5b4762a7ab668c47aa212f85aaa4f376)

tags: added: in-stable-kilo
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.