when using xenapi, there is no clean-up if a vm fails to spawn

Bug #694935 reported by Armando Migliaccio
10
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-instance to clean it up.

revno 497

Changed in nova:
assignee: nobody → Armando Migliaccio (armando-migliaccio)
status: New → Confirmed
Thierry Carrez (ttx)
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)
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

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.
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-instances). If we perform a complete clean-up, no information about the instance which failed to spawn will be left.

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.

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Alternatively, we can perform a complete clean-up when a VM fails to spawn. However, in my opinion, we still need to provide a way to inform the user the VM has failed to spawn.

Thierry Carrez (ttx)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.2
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.