Please see the alternative fix:
https://review.openstack.org/#/c/324380/

** 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/1450375

Title:
  cannot delete v2 healthmonitor if the hm-associated-pool was deleted
  first

Status in neutron:
  Fix Released

Bug description:
  Steps:
  1. create lb
  2. create listener
  3. create pool  (pool-1)
  4. add a healthmonitor (healthmonitor-1) to pool-1
  5. delete the pool-1

  Then, you cannot delete healthmonitor-1 if the pool-1 was deleted
  first.

  
  Log:

  2015-04-30 16:51:23.422 6369 INFO neutron.wsgi 
[req-2876374c-03c3-49b6-825c-83116108cbed cf6a52a3be734e4cad457d5283148882 
356b4d225c7e44de961d888086948f7c - - -] 172.16.2.10 - - [30/Apr/2015 16:51:23] 
"GET /v2.0/lbaas/healthmonitors.json?tenant_id=356b4d225c7e44de961d888086948f7c 
HTTP/1.1" 200 754 0.280336
  2015-04-30 16:51:23.430 6369 INFO neutron.wsgi [-] (6369) accepted 
('172.16.2.10', 17115)
  2015-04-30 16:51:23.532 6369 ERROR neutron.api.v2.resource 
[req-88a2316d-805a-4bad-a52b-b270325008e7 cf6a52a3be734e4cad457d5283148882 
356b4d225c7e44de961d888086948f7c - - -] delete failed
  2015-04-30 16:51:23.532 6369 TRACE neutron.api.v2.resource Traceback (most 
recent call last):
  2015-04-30 16:51:23.532 6369 TRACE neutron.api.v2.resource   File 
"/usr/lib/python2.6/site-packages/neutron/api/v2/resource.py", line 83, in 
resource
  2015-04-30 16:51:23.532 6369 TRACE neutron.api.v2.resource     result = 
method(request=request, **args)
  2015-04-30 16:51:23.532 6369 TRACE neutron.api.v2.resource   File 
"/usr/lib/python2.6/site-packages/neutron/api/v2/base.py", line 490, in delete
  2015-04-30 16:51:23.532 6369 TRACE neutron.api.v2.resource     
obj_deleter(request.context, id, **kwargs)
  2015-04-30 16:51:23.532 6369 TRACE neutron.api.v2.resource   File 
"/usr/lib/python2.6/site-packages/neutron_lbaas/services/loadbalancer/plugin.py",
 line 887, in delete_healthmonitor
  2015-04-30 16:51:23.532 6369 TRACE neutron.api.v2.resource     
constants.PENDING_DELETE)
  2015-04-30 16:51:23.532 6369 TRACE neutron.api.v2.resource   File 
"/usr/lib/python2.6/site-packages/neutron_lbaas/db/loadbalancer/loadbalancer_dbv2.py",
 line 159, in test_and_set_status
  2015-04-30 16:51:23.532 6369 TRACE neutron.api.v2.resource     
db_lb_child.root_loadbalancer.id)
  2015-04-30 16:51:23.532 6369 TRACE neutron.api.v2.resource   File 
"/usr/lib/python2.6/site-packages/neutron_lbaas/db/loadbalancer/models.py", 
line 115, in root_loadbalancer
  2015-04-30 16:51:23.532 6369 TRACE neutron.api.v2.resource     return 
self.pool.listener.loadbalancer
  2015-04-30 16:51:23.532 6369 TRACE neutron.api.v2.resource AttributeError: 
'NoneType' object has no attribute 'listener'

  
  Code:

  class HealthMonitorV2(model_base.BASEV2, models_v2.HasId,
  models_v2.HasTenant):

      ...

      @property
      def root_loadbalancer(self):
          return self.pool.listener.loadbalancer

  
  Potential Solution:
  1. Check pool whether binding a healthmonitor before delete
  2. Add loadbalancer attr to HealthMonitorV2

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1450375/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to