Fails to delete missing resource

Bug #1622026 reported by Turbo Fredriksson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
New
Undecided
Unassigned

Bug Description

I'm trying to delete a stack, but it's failing. Usually, with a little manual help, it eventually succeeds if I try enough times.

But not this time it seems.

----- s n i p -----
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource Traceback (most recent call last):
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 704, in _action_recorder
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource yield
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 1479, in delete
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource yield self.action_handler_task(action, *action_args)
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/scheduler.py", line 314, in wrapper
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource step = next(subtask)
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 749, in action_handler_task
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource while not check(handler_data):
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resources/stack_resource.py", line 462, in check_delete_complete
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource return self._check_status_complete(self.DELETE)
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resources/stack_resource.py", line 390, in _check_status_complete
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource action=action)
2016-09-09 22:46:23.533 28178 ERROR heat.engine.resource ResourceFailure: EntityNotFound: resources.reverse.resources.record: The Designate Domain (0.103.10.in-addr.arpa.) could not be found.
----- s n i p -----

The stack resources:

----- s n i p -----
# heat resource-list jenkins-jenkins
+------------------+--------------------------------------+------------------------------+-----------------+---------------------+
| resource_name | physical_resource_id | resource_type | resource_status | updated_time |
+------------------+--------------------------------------+------------------------------+-----------------+---------------------+
| artefacts | | OS::Swift::Container | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| cpu_alarm_high | | OS::Ceilometer::Alarm | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| cpu_alarm_low | | OS::Ceilometer::Alarm | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| firewall | | OS::Neutron::Firewall | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| fw_policy | | Turbo::FWPolicy | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| fw_rule_22-in | | Turbo::FWRule | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| fw_rule_443-in | | Turbo::FWRule | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| fw_rule_53-out | | Turbo::FWRule | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| fw_rule_80-in | | Turbo::FWRule | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| instance | | Turbo::InstanceFloatingIP | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| interface | | OS::Neutron::RouterInterface | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| scaledown_policy | | OS::Heat::ScalingPolicy | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| scaleup_policy | | OS::Heat::ScalingPolicy | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| subnet | | OS::Neutron::Subnet | DELETE_COMPLETE | 2016-09-09T13:58:56 |
| network | 92c582c9-b6f6-48e3-8884-8c1afeb96121 | OS::Neutron::Net | CREATE_COMPLETE | 2016-09-09T13:58:57 |
| swarms | 2e546984-4c07-4784-aa5f-0962c960b513 | OS::Heat::AutoScalingGroup | DELETE_FAILED | 2016-09-09T13:58:57 |
+------------------+--------------------------------------+------------------------------+-----------------+---------------------+
----- s n i p -----

The network behind the "OS::Neutron::Net" is deleted manually.

Revision history for this message
Drago (dragorosson) wrote :

Possible fix may be to re-raise the original exceptions.NotFound exception instead of throwing a new exception (heat_exceptions.EntityNotFound) https://github.com/openstack/heat/blob/cd125f328e3e4e9f517278b04347515eba380d5a/heat/engine/clients/os/designate.py#L50

Revision history for this message
Turbo Fredriksson (turbo-bayour) wrote :

The quick hack suggested by Drago works for me.

----- s n i p -----
--- designate.py.orig 2016-09-09 23:58:02.185444387 +0100
+++ designate.py 2016-09-09 23:57:39.840927390 +0100
@@ -51,6 +51,7 @@
             for domain in self.client().domains.list():
                 if domain.name == domain_id_or_name:
                     return domain.id
+ raise

         raise heat_exception.EntityNotFound(entity='Designate Domain',
                                             name=domain_id_or_name)
----- s n i p -----

Might not be the correct fix, but for now I'm good with it.

Revision history for this message
Turbo Fredriksson (turbo-bayour) wrote :

Ehm.. Wrong indentation there I think. It was right when I posted it. It's supposed to be in line with the "for" loop above it.

Revision history for this message
tamil vanan (tamilhce) wrote :

Can i have steps to reproduce this issue

Revision history for this message
Turbo Fredriksson (turbo-bayour) wrote : Re: [Bug 1622026] Re: Fails to delete missing resource

> Can i have steps to reproduce this issue

I have been unable to NOT have this problem! But I'm guessing the biggest chance of triggering it is to use several levels of sub-stacks.

Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
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.