Bug 1293381 - HA network tenants are not deleted
Summary: HA network tenants are not deleted
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ga
: 8.0 (Liberty)
Assignee: Nir Magnezi
QA Contact: Alexander Stafeyev
URL:
Whiteboard:
Depends On:
Blocks: 1301399
TreeView+ depends on / blocked
 
Reported: 2015-12-21 15:44 UTC by Attila Fazekas
Modified: 2016-04-26 20:26 UTC (History)
8 users (show)

Fixed In Version: openstack-neutron-7.0.1-4
Doc Type: Bug Fix
Doc Text:
Prior to this update, when the last HA router of a tenant was deleted, the HA network belonging to the tenant was not removed. This happened in certain scenarios, such as the 'router delete' API call, which raised an exception since the router had been deleted. That scenario was possible due to a race condition between HA router 'create' and 'delete' operations. As a result of this issue, HA network tenants were not deleted. This update resolves the race condition, and now catches the exceptions 'ObjectDeletedError' and 'NetworkInUse' when a user deletes the last HA router, and also moves the HA network deleting procedure under the 'ha_network exist' check block. In addition, the fix checks whether or not HA routers are present, and deletes the HA network when the last HA router is deleted.
Clone Of:
: 1301399 (view as bug list)
Environment:
Last Closed: 2016-04-07 21:20:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1367157 0 None None None 2015-12-23 16:11:32 UTC
OpenStack gerrit 207395 0 'None' 'MERGED' 'Delete HA network when last HA router is deleted' 2019-11-29 05:41:58 UTC
OpenStack gerrit 259580 0 'None' 'MERGED' 'Catch known exceptions during deleting last HA router' 2019-11-29 05:41:58 UTC
Red Hat Product Errata RHEA-2016:0603 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 8 Enhancement Advisory 2016-04-08 00:53:53 UTC

Description Attila Fazekas 2015-12-21 15:44:47 UTC
Description of problem:

I have too many HA networks:
$ neutron net-list
+--------------------------------------+----------------------------------------------------+-------------------------------------------------------+
| id                                   | name                                               | subnets                                               |
+--------------------------------------+----------------------------------------------------+-------------------------------------------------------+
| 26b608fc-d56b-4213-b56f-8f223cc7afca | HA network tenant 21306e7143ae4c70a8a8d04b7e801098 | c716f96c-c4b0-496a-b8da-df5d75c6592c 169.254.192.0/18 |
| c40fb5fb-ede5-401b-8fbc-479040f4cbf1 | HA network tenant feaf0caae2ab4c7085e19c2b516fe60b | 74674ddb-93ff-4134-bd3d-6fd6add7174a 169.254.192.0/18 |
| 727cc932-2b38-44a4-8298-f3d09449a0e8 | HA network tenant 4b3cd36777fe4cf2b3ef560384b57783 | c28097f1-ff7a-4f8a-bc14-a9ed327840e3 169.254.192.0/18 |
| f95b4c76-6d78-40bb-9bcd-7778fb75f688 | HA network tenant 3943b7f7c8d24dada236d6fb581eddca | a90be95e-2a19-483d-aebb-e1208a73398a 169.254.192.0/18 |
| c02632d5-f2b5-49dc-84c1-73434b014fae | HA network tenant fe4f692cd3cd439e81f9f71f25ecb226 | 6cd3c087-63f3-4638-b70c-5a148cec4ac4 169.254.192.0/18 |
| 201a5c4a-37dc-452e-8b5c-0462bcafc454 | HA network tenant 79695d4cf02f4c2c96fa82840c1d68d2 | fb4d917b-d9f2-45bc-9b75-00c311000739 169.254.192.0/18 |
| 6d03394e-9409-4525-bd0d-145de93ae816 | HA network tenant 34eb793bb35b474191300a4966b7268f | 1f61e69a-7743-41a5-99b2-86d82d7ae744 169.254.192.0/18 |
| f84d43bf-7c89-4527-ae76-29ab1f085097 | HA network tenant 8e6068056c9f493081d3d1db48e0ee9c | 21789fd7-efb6-4c00-9a7d-51b9831ca015 169.254.192.0/18 |
| b1b6dfe5-1a57-4fae-86b8-8f9039d6af45 | HA network tenant 9dd520ad85ee4c6e89613bae68052354 | 08d8944d-e42e-4103-87ee-03869d8a0d36 169.254.192.0/18 |
| 13f248ad-2071-4554-959a-eb477d4718b9 | HA network tenant 0dcaa9dc1be74259a4493467d8dfef92 | 41f84884-2b1b-4f7c-8468-f5024ce104e9 169.254.192.0/18 |
| 68b0ca35-01a4-41af-9520-f8bf50249717 | HA network tenant 8c981a851c64485fbe467cacba077c11 | 70af0747-a6f3-477d-99c2-d392a7553e04 169.254.192.0/18 |
| f45594c7-7cb7-4843-9efa-42cf4439b4aa | HA network tenant 059ce7c64ebf4d6b95204abf435ba566 | ce97e3b9-b4d9-46ad-b130-c49e284829ee 169.254.192.0/18 |
| a075350a-9f75-4dc3-9f4d-9ffd80ad8e6f | HA network tenant 8fcc153020aa4e3fa6ea9c179b00c612 | 03edfea9-5bc2-4f80-9a3c-fe4450ab81a4 169.254.192.0/18 |
| 0c0321a5-0ad8-4610-8f3a-d2723e44a103 | HA network tenant a945ef7b1b604ae5a55d1f77d0187435 | 34cda6b5-68bb-407e-9335-64b45c46ea1c 169.254.192.0/18 |
| 62ddf587-1169-460e-8740-cd1315250ef7 | HA network tenant 0b2007275cff4589b708f8b5130bef5b | 19f29d54-b8ea-450d-9311-4ac589bd9644 169.254.192.0/18 |
| e62dafb6-c5d6-4add-8eec-e2fadb89f3e1 | HA network tenant 8dc2549ae2eb47d3b7015eddc8f84ada | ecadfc3c-00bb-4595-b3a2-a07359c9a5ab 169.254.192.0/18 |
| 9ebc79a2-4e27-47eb-a785-3409ab68dc94 | HA network tenant c1f961a8c03b49a785de1000d37298a6 | 8c49ea8a-2f5c-40d1-add2-26032d79a14f 169.254.192.0/18 |
| 515cf8dc-5cfe-4fdc-9503-b659cadad1af | HA network tenant 84d180e8c2774d0793a1f4519f408d12 | 1ba2add1-e7bd-4c0f-8d72-fe2fa423fab4 169.254.192.0/18 |
| cd50cbcf-a615-402e-a7fd-6d208aedc8c9 | HA network tenant c23c1c3149874eaaaf0a79e7a7fecb6d | be017dc9-5e62-46a1-be19-9e1a89c38694 169.254.192.0/18 |
| 928b8df9-9684-4614-8028-2cfa2491d772 | HA network tenant 844fd6466bb640ed9bbc548310d230c6 | b428dcaf-d11a-4c62-af37-b47022817d6c 169.254.192.0/18 |
| 3345ba51-2f9e-4b39-aa31-00d571630493 | HA network tenant b65d733c43234925952b1086505ef9cf | a0047fcd-e013-4846-b34c-d8700c722d8e 169.254.192.0/18 |
| ca3e87ce-6586-40a4-ba53-626192ea57d2 | nova                                               | ca822ad8-e2eb-4f3f-a1a8-6242d1793e71 172.16.23.0/24   |
| 75fd1427-9f80-4b8d-b041-25676830a1f4 | HA network tenant f9cf8c4c859746719e4a2f6f094e5caa | 813ea536-bc6a-4169-bb95-541925bc8552 169.254.192.0/18 |
+--------------------------------------+----------------------------------------------------+-------------------------------------------------------+
[stack@instack ~]$ neutron router-list
+--------------------------------------+----------+-----------------------+-------------+------+
| id                                   | name     | external_gateway_info | distributed | ha   |
+--------------------------------------+----------+-----------------------+-------------+------+
| 09d5114d-5c8e-48d2-bca7-01ad10304d62 | router-1 | null                  | False       | True |
+--------------------------------------+----------+-----------------------+-------------+------+


Version-Release number of selected component (if applicable):
openstack-neutron-7.0.0-5.el7ost.noarch

How reproducible:
looks like always

Steps to Reproduce:
1. create new tenant/user
2. create router
3. delete router/tenant/user

Actual results:

"HA network tenant %s" still exists for the given tenant.

Expected results:
The 'HA network tenant %s' will be deleted after the tenant does not have any network resource.

Additional info:
director-8 installation with isolated networks.
3 controller, 1 compute

Comment 3 Assaf Muller 2015-12-23 16:12:35 UTC
We recently fixed this u/s (Linked u/s bug and two patches). We backported it to upstream stable/liberty, now we'll backport it to OSP 8 branch.

Comment 4 Assaf Muller 2015-12-23 16:15:09 UTC
I just checked and the latest OSP 8 rebase caught the first patch (207395) but not the second (259580), so just that one needed.

Comment 9 Alexander Stafeyev 2016-01-26 10:07:34 UTC
[stack@instack ~]$ rpm -qa |grep openstack-neut
openstack-neutron-7.0.1-8.el7ost.noarch


Did the reproduction steps. No HA network seen after deleted all tenants/users and routers. 

neutron net-list 
+--------------------------------------+------+-----------------------------------------------------+
| id                                   | name | subnets                                             |
+--------------------------------------+------+-----------------------------------------------------+
| 2273e9a2-9517-4107-b1d5-7e8d6e28a8ac | nova | bd4f6ffb-3f38-4d57-9fa4-daae49483948 172.16.23.0/24 |
+--------------------------------------+------+-----------------------------------------------------+

Comment 10 errata-xmlrpc 2016-04-07 21:20:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-0603.html


Note You need to log in before you can comment on or make changes to this bug.