yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #52101
[Bug 1571097] Re: unable to delete lbaasv2 health monitor if its listener deleted
Reviewed: https://review.openstack.org/324380
Committed: https://git.openstack.org/cgit/openstack/neutron-lbaas/commit/?id=4effc9b96ef6317cefb25768dd60bd0f5f4abac5
Submitter: Jenkins
Branch: master
commit 4effc9b96ef6317cefb25768dd60bd0f5f4abac5
Author: Evgeny Fedoruk <evgenyf@xxxxxxxxxxx>
Date: Thu Jun 2 01:29:42 2016 -0700
Preventing pool deletion if pool has healthmonitor
If HM is associated to pool, HM should be deleted prior
to pool deletion.
Trying to delete pool with HM will fail with EntityInUse exception.
This is to preserve common neutron's API concept to delete cascade
resources' subresources only.
Change-Id: I1bfc4d8d8ec7e83b1de11c8fb3e66282bfd06806
Closes-Bug: 1571097
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1571097
Title:
unable to delete lbaasv2 health monitor if its listener deleted
Status in neutron:
Fix Released
Bug description:
problem is in Kilo neutron-lbaas branch.
monitor is attached a pool.
When pool and listener were deleted, not error reported that there is a health-monitor associated to pool.
If all lbaas resoruces except health-monitor were deleted, health
monitor can not be deleted.
See the following procedure to reproduce this issue:
$ neutron lbaas-loadbalancer-create --name=v-lb2 lb2-v-1574810802
$ neutron lbaas-listener-create --protocol=HTTP --protocol-port=80 --name=v-lb2-1 --loadbalancer=v-lb2
$ neutron lbaas-pool-create --lb-algorithm=ROUND_ROBIN --protocol=HTTP --name=v-lb2-pool --listener=v-lb2-1
$ neutron lbaas-member-create --subnet lb2-v-1574810802 --address 10.199.88.3 --protocol-port=80 v-lb2-pool
$ neutron lbaas-member-create --subnet lb2-v-1574810802 --address 10.199.88.4 --protocol-port=80 v-lb2-pool
$ neutron lbaas-healthmonitor-create --max-retries=3 --delay=3 --timeout=10 --type=HTTP --pool=v-lb2-pool
$ neutron lbaas-member-delete 4d2977fc-5600-4dbf-8af2-35c017c8f4a0 v-lb2-pool
$ neutron lbaas-member-delete 2f60a49b-add1-43d6-97d8-4e53a925b25f v-lb2-pool
$ neutron lbaas-pool-delete v-lb2-pool
$ neutron lbaas-listener-delete v-lb2-1
$ neutron lbaashealthmonitor-delete 044f98a5-755d-498d-a38e-18eb8ca13884
neutron log seems point to lbaas resources were gone.
In this specific issue, we should just remove the health monitor from system.
2016-04-10 16:57:38.220 INFO neutron.wsgi [req-7e697943-e70d-4ac8-a840-b1edf441806a Venus Venus] 10.34.57.68 - - [10/Apr/2016 16:57:38] "GET /v2.0/lbaas/healthmonitors.json?fields=id&id=044f98a5-755d-498d-a38e-18eb8ca13884 HTTP/1.1" 200 444 0.112257
2016-04-10 16:57:38.252 ERROR neutron.api.v2.resource [req-aaeae392-33b2-427c-96a0-918782882c9a Venus Venus] delete failed
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource Traceback (most recent call last):
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 83, in resource
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource result = method(request=request, **args)
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 490, in delete
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource obj_deleter(request.context, id, **kwargs)
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource File "/opt/stack/neutron-lbaas/neutron_lbaas/services/loadbalancer/plugin.py", line 906, in delete_healthmonitor
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource constants.PENDING_DELETE)
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource File "/opt/stack/neutron-lbaas/neutron_lbaas/db/loadbalancer/loadbalancer_dbv2.py", line 163, in test_and_set_status
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource db_lb_child.root_loadbalancer.id)
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource File "/opt/stack/neutron-lbaas/neutron_lbaas/db/loadbalancer/models.py", line 115, in root_loadbalancer
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource return self.pool.listener.loadbalancer
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource AttributeError: 'NoneType' object has no attribute 'listener'
2016-04-10 16:57:38.252 4158 TRACE neutron.api.v2.resource
2016-04-10 16:57:38.253 INFO neutron.wsgi [req-aaeae392-33b2-427c-96a0-918782882c9a Venus Venus] 10.34.57.68 - - [10/Apr/2016 16:57:38] "DELETE /v2.0/lbaas/healthmonitors/044f98a5-755d-498d-a38e-18eb8ca13884.json HTTP/1.1" 500 383 0.030720
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1571097/+subscriptions
References