[SRU] v1 driver does not delete namespace when pool deleted

Bug #1664203 reported by Edward Hope-Morley
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Invalid
Undecided
Unassigned
Kilo
Fix Released
High
Unassigned
Liberty
Fix Released
High
Unassigned
Mitaka
Fix Released
High
Unassigned
neutron-lbaas (Ubuntu)
Invalid
High
Unassigned
Trusty
Won't Fix
High
Edward Hope-Morley
Xenial
Fix Released
High
Edward Hope-Morley
Yakkety
Won't Fix
High
Unassigned

Bug Description

[Impact]

The v1 services.loadbalancer.drivers.haproxy.namespace_driver has a bug in that it deletes the haproxy state directory for a pool when it's vip is deleted. This means that when the pool itself is deleted, its associated namespace is never deleted since the delete is predicated on the state path being extant.

The v1 driver is deprecated as of the Liberty release and was totally removed from the codebase in the Newton release. However, Openstack Kilo and Mitaka are still supported in Ubuntu, the former requiring the v1 driver and the latter still capable of using it so while upstream will not accept a patch we will still patch the neutron-lbaas-agent Ubuntu package to fix this issue.

[Test Case]

Please see http://pastebin.ubuntu.com/24058957/

[Regression Potential]

None

Changed in neutron-lbaas (Ubuntu):
milestone: ubuntu-16.04.2 → none
Revision history for this message
Edward Hope-Morley (hopem) wrote :
Revision history for this message
Edward Hope-Morley (hopem) wrote :
Revision history for this message
Edward Hope-Morley (hopem) wrote :
Revision history for this message
Edward Hope-Morley (hopem) wrote :
Changed in neutron-lbaas (Ubuntu):
status: New → In Progress
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "lp1664203-xenial-mitaka.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Louis Bouchard (louis)
Changed in neutron-lbaas (Ubuntu Yakkety):
status: New → Won't Fix
Changed in neutron-lbaas (Ubuntu Xenial):
status: New → In Progress
description: updated
summary: - v1 driver does not delete namespace when pool deleted
+ [SRU] v1 driver does not delete namespace when pool deleted
Mathew Hodson (mhodson)
Changed in neutron-lbaas (Ubuntu Trusty):
importance: Undecided → High
Changed in neutron-lbaas (Ubuntu Yakkety):
importance: Undecided → High
Changed in neutron-lbaas (Ubuntu Xenial):
importance: Undecided → High
Changed in cloud-archive:
status: New → Invalid
Changed in neutron-lbaas (Ubuntu Trusty):
assignee: nobody → Edward Hope-Morley (hopem)
Changed in neutron-lbaas (Ubuntu Xenial):
assignee: nobody → Edward Hope-Morley (hopem)
Changed in neutron-lbaas (Ubuntu):
assignee: Edward Hope-Morley (hopem) → nobody
status: In Progress → Invalid
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Ed, does this bug exist in lbaas v2 as well? The code in master and other branches for undeploy_instance() in neutron_lbaas/drivers/haproxy/namespace_driver.py is very similar.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Also, can we drop the target for trusty-icehouse or do we need to keep that target?

Revision history for this message
Corey Bryant (corey.bryant) wrote :

If this is also a bug for lbaas v2, I'd like to see if we can get that fixed upstream/backported first.

tags: added: sts-sru
Revision history for this message
Edward Hope-Morley (hopem) wrote :

Hi Corey, this bug only applies to the v1 driver and since we still support it (since it is the default in Kilo - our mid-term lts) we are applying this fix from Kilo up to the point prior to the v1 driver being removed from upstream in Newton. For the record, it is recommended that people use the v2 driver as of Liberty. So there's no need to fix anything upstream and no need to apply this beyond Mitaka.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

And to be clear, there was a similar bug in the v2 driver that has been subsequently fixed as part of bug 1495430. We can backport that separately.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Ed, here's the v2 code I was thinking may also be affected. I don't know the code well but it seems to be the same function as is in v1, so that's why I was thinking this affects v2 as well. But maybe this is dead code or fixed elsewhere in v2?

See 'if delete_namespace:' at: https://github.com/openstack/neutron-lbaas/blob/master/neutron_lbaas/drivers/haproxy/namespace_driver.py#L161

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Corey, the code is a little confusing since they split the codebase between v1 and v2 but most modules have the same names. The code that you point to there is the v2 driver. You won't actually find the v1 code in master anymore since it was completely removed in Newton but if you go back to mitaka you can find it in https://github.com/openstack/neutron-lbaas/tree/stable/mitaka/neutron_lbaas/services/loadbalancer/drivers.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Thanks for the explanation Ed. It looks like this is fixed for v2 in bug 1495430.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Edward, or anyone else affected,

Accepted neutron-lbaas into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/neutron-lbaas/2:8.3.0-0ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in neutron-lbaas (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
description: updated
description: updated
Revision history for this message
Edward Hope-Morley (hopem) wrote :

I have tested the -proposed package with Xenial Mitaka and it lgtm.

tags: added: verification-done
removed: verification-needed
Revision history for this message
James Page (james-page) wrote :

Hello Edward, or anyone else affected,

Accepted neutron-lbaas into liberty-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:liberty-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-liberty-needed to verification-liberty-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-liberty-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-liberty-needed
Revision history for this message
James Page (james-page) wrote :

Hello Edward, or anyone else affected,

Accepted neutron-lbaas into mitaka-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:mitaka-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-mitaka-needed to verification-mitaka-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-mitaka-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-mitaka-needed
Revision history for this message
James Page (james-page) wrote :

Hello Edward, or anyone else affected,

Accepted neutron-lbaas into kilo-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:kilo-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-kilo-needed to verification-kilo-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-kilo-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-kilo-needed
tags: added: verification-mitaka-done
removed: verification-mitaka-needed
tags: added: verification-liberty-done
removed: verification-liberty-needed
tags: added: verification-kilo-done
removed: verification-kilo-needed
tags: added: sts-sru-needed
removed: sts-sru
Revision history for this message
James Page (james-page) wrote : Update Released

The verification of the Stable Release Update for neutron-lbaas has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
James Page (james-page) wrote :

This bug was fixed in the package neutron-lbaas - 1:2015.1.4-0ubuntu3
---------------

 neutron-lbaas (1:2015.1.4-0ubuntu3) trusty-kilo; urgency=medium
 .
   * Add patch to ensure namespace deleted by v1 driver delete_pool (LP: #1664203)
     - d/p/ensure_namespace_deleted_with_pool.patch

Revision history for this message
James Page (james-page) wrote :

The verification of the Stable Release Update for neutron-lbaas has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
James Page (james-page) wrote :

This bug was fixed in the package neutron-lbaas - 2:7.1.1-0ubuntu1~cloud1
---------------

 neutron-lbaas (2:7.1.1-0ubuntu1~cloud1) trusty-liberty; urgency=medium
 .
   * Add patch to ensure namespace deleted by v1 driver delete_pool (LP: #1664203)
     - d/p/ensure_namespace_deleted_with_pool.patch

Revision history for this message
James Page (james-page) wrote :

The verification of the Stable Release Update for neutron-lbaas has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
James Page (james-page) wrote :

This bug was fixed in the package neutron-lbaas - 2:8.3.0-0ubuntu2~cloud0
---------------

 neutron-lbaas (2:8.3.0-0ubuntu2~cloud0) trusty-mitaka; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 neutron-lbaas (2:8.3.0-0ubuntu2) xenial; urgency=medium
 .
   * Add patch to ensure namespace deleted by v1 driver delete_pool (LP: #1664203)
     - d/p/ensure_namespace_deleted_with_pool.patch

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package neutron-lbaas - 2:8.3.0-0ubuntu2

---------------
neutron-lbaas (2:8.3.0-0ubuntu2) xenial; urgency=medium

  * Add patch to ensure namespace deleted by v1 driver delete_pool (LP: #1664203)
    - d/p/ensure_namespace_deleted_with_pool.patch

 -- Edward Hope-Morley <email address hidden> Mon, 13 Feb 2017 15:17:31 +0000

Changed in neutron-lbaas (Ubuntu Xenial):
status: Fix Committed → Fix Released
Changed in neutron-lbaas (Ubuntu Trusty):
status: New → Won't Fix
tags: added: sts-sru
removed: sts-sru-needed
tags: added: sts-sru-done
removed: sts-sru
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.