when using xenapi, there is no clean-up if a vm fails to spawn
Bug #694935 reported by
Armando Migliaccio
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Salvatore Orlando |
Bug Description
During the spawning of VM, a XenAPI.Failure NO_HOST_AVAILABLE may be returned. In such case the VM is left broken in shutdown state and a user must do euca-terminate-
revno 497
Changed in nova: | |
assignee: | nobody → Armando Migliaccio (armando-migliaccio) |
status: | New → Confirmed |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
status: | Confirmed → In Progress |
Changed in nova: | |
assignee: | Armando Migliaccio (armando-migliaccio) → nobody |
Changed in nova: | |
assignee: | nobody → Salvatore Orlando (salvatore-orlando) |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → 2011.2 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The porposed fix in the branch attached to this bug report puts the VM in a (new) 'FAILED' power state. It does not perform a clean-up. instances) . If we perform a complete clean-up, no information about the instance which failed to spawn will be left.
This because the user needs to know what has happened to the VM he/she was trying to run. Normally, API users do not have access to log files. In this case, the only way for the user to know what happened to the instance is to query its state (e.g.: doing euca-describe-
As regards the NO_HOST_AVAILABLE error, which occurs when there is not enough RAM left on the host, the amount of available memory is now checked at the beginning of the spawn process. This way, if there is not enough RAM left on the host, the spawn process returns immediately, as there is no point in allocating an IP address and streaming the image if there is not enough memory to run the instance.
A test case (spawn_ not_enough_ memory) has been added as well.