If instance spawn fails and shutdown_instance also fails, a new exception is raised, masking original spawn failure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Shraddha Pandhe |
Bug Description
When nova-compute, when building and running the instance, calls spawn on virt driver, spawn can fail for several reasons.
e.g. For Ironic, the spawn call can fail if deploy callback timeout happens.
If this call fails, nova-compute catches the exception, saves it for re-raising and calls shutdown_instance in a try-except block [1]. The problem is, if this shutdown_instance call also fails, a new exception 'BuildAbortExce
This can cause problems for Ironic where, if deployment failed due to timeout, there is a good chance that shutdown_instance will also fail due to same reason, since it involves zapping etc. So original deployment failure will not be propagated back as instance fault.
[1] https:/
tags: | added: compute |
Changed in nova: | |
assignee: | nobody → Pushkar Umaranikar (pushkar-umaranikar) |
summary: |
If instance spawn fails and shutdown_instance also fails, a new - excpetion is raised, masking original spawn failure + exception is raised, masking original spawn failure |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Could I get some more info about what the issues is with the exception not being re-raised properly?
What Exception is being masked? What issues is this causing in Ironic?
My reading of the code is:
_build_resources is called by _build_ and_run_ instance.
_build_ and_run_ instance deals with exception handling.
Some of these exceptions are then translated to a ResceduledException which will retry the instance creation. Others to a BuildAbortExcep tion.
Are you saying that the creation of the BuildAbortException is masking one of the exceptions that could should have been translated to a retry?