db.instance_set_state reference in xenapi/vmops.py is wrong
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Aaron Lee | ||
Diablo |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
There's all sorts of issues with xenapi/vmops.py's _create_vm() surrounding the code when 'VMhelper.
1) LOG.exception() is wrong. There's no exception thrown
2) The call to db.instance_
3) It returns None... but callers expect it to always succeed.
I think the solution is:
1) Change LOG.exception to a LOG.error
2) raise an exception instead of setting state and returning.
3) Remove instance_set_state from db/api.py
_create_vm() ends up being called from spawn() and finish_migration(). May want to look for callers of those in the compute manager and elsewhere to see that exceptions are caught properly and vm_state is set appropriately to vm_states.ERROR. There may be a separate bug filed for this, however, that aaron lee is working on.
Changed in nova: | |
milestone: | none → essex-1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | essex-1 → 2012.1 |
This is very similar to 851374, and the fix is basically the same. However instead of separately logging the insufficient memory error I think it should be loged along with the rest of the errors in the api's error handler.