RunValidationAction fails with UnboundLocalError when identity file is missing

Bug #1620476 reported by Martin André
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Martin André

Bug Description

When the RunValidationAction is called before the tripleo.validations.v1.copy_ssh_key workflow is run (and thus there is no identity file present in the mistral environment) we get an UnboundLocalError:

2016-09-05 15:46:33.427 4284 ERROR mistral.engine.default_executor [-] Failed to run action [action_ex_id=29e56712-5097-4e21-8118-9a8e4dfd36ec, action_cls='<class 'mistral.actions.action_factory.RunValidationActio
n'>', attributes='{}', params='{u'validation': u'512', u'plan': u'overcloud'}']
 local variable 'identity_file' referenced before assignment
2016-09-05 15:46:33.427 4284 ERROR mistral.engine.default_executor Traceback (most recent call last):
2016-09-05 15:46:33.427 4284 ERROR mistral.engine.default_executor File "/usr/lib/python2.7/site-packages/mistral/engine/default_executor.py", line 90, in run_action
2016-09-05 15:46:33.427 4284 ERROR mistral.engine.default_executor result = action.run()
2016-09-05 15:46:33.427 4284 ERROR mistral.engine.default_executor File "/usr/lib/python2.7/site-packages/tripleo_common/actions/validations.py", line 109, in run
2016-09-05 15:46:33.427 4284 ERROR mistral.engine.default_executor utils.cleanup_identity_file(identity_file)
2016-09-05 15:46:33.427 4284 ERROR mistral.engine.default_executor UnboundLocalError: local variable 'identity_file' referenced before assignment
2016-09-05 15:46:33.427 4284 ERROR mistral.engine.default_executor

Tags: validations
Changed in tripleo:
status: New → Triaged
Revision history for this message
Tomas Sedovic (tsedovic) wrote :

The CR has been merged, not sure why it wasn't picked up automatically:

https://review.openstack.org/#/c/365906/

Changed in tripleo:
status: Triaged → Fix Committed
Changed in tripleo:
status: Fix Committed → Fix Released
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.