diff options
author | Salvatore Orlando <salvatore.orlando@eu.citrix.com> | 2011-02-15 17:30:19 +0000 |
---|---|---|
committer | Tarmac <> | 2011-02-15 17:30:19 +0000 |
commit | 7e80b2086481a68123454d910ed99cb419f6a1f4 (patch) | |
tree | fbbf08fd4c6e4b1e28e34f559c7d62e8786180c3 /nova/exception.py | |
parent | a9705d95bace415df7796f9ef9562b118d4d1f68 (diff) | |
parent | e32a0131cfa0d7655545aca50559d9988e62142d (diff) | |
download | nova-7e80b2086481a68123454d910ed99cb419f6a1f4.tar.gz nova-7e80b2086481a68123454d910ed99cb419f6a1f4.tar.xz nova-7e80b2086481a68123454d910ed99cb419f6a1f4.zip |
The proposed fix puts a VM which fails to spawn 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.
For 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.
A test case (spawn_not_enough_memory) has been added as well.
I understand adding a new value to the power_state enumeration might not be acceptable. In that case I will propose for merge a different branch in which we perform a complete clean-up.
However, I reckon we still to provide a way to inform the user the spawn process has failed.
Diffstat (limited to 'nova/exception.py')
0 files changed, 0 insertions, 0 deletions