can't delete environment when exception occured in destroy method

Bug #1642648 reported by chenyujie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
New
Undecided
Unassigned

Bug Description

code abstract as following from murano.common.engine.TaskExecutor:
...
            try:
                LOG.debug('Invoking pre-cleanup hooks')
                self.session.start()
                executor.object_store.cleanup()
            except Exception as e:
                return self.exception_result(e, obj, '<GC>')
            finally:
                LOG.debug('Invoking post-cleanup hooks')
                self.session.finish()
            self._model['ObjectsCopy'] = \
                copy.deepcopy(self._model.get('Objects'))
...

When there is error in service, deleting would always be failed because the exception and the environment keeps the cleanup record, so the environment would be deadlock because it is difficult to fix a non-existing service. However, if we keep running after the exception result, 'ObjectsCopy' would be replaced by 'Object', and the environment could recover normal status. Fix as following:

            except Exception as e:
                self.exception_result(e, obj, '<GC>')

Revision history for this message
chenyujie (gzyjchen) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.