When we run instance with no enough memory state, it cause Uncaught exception.
1. Such exception should be wrapped.
2. We should check available memory when we launch new instance.
2011-11-25 18:05:32,840 ERROR nova.exception [-] Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/opt/stack/nova/nova/exception.py", line 98, in wrapped
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File "/opt/stack/nova/nova/virt/libvirt/connection.py", line 606, in spawn
(nova.exception): TRACE: domain = self._create_new_domain(xml)
(nova.exception): TRACE: File "/opt/stack/nova/nova/virt/libvirt/connection.py", line 1217, in _create_new_domain
(nova.exception): TRACE: domain.createWithFlags(launch_flags)
(nova.exception): TRACE: File "/usr/lib/python2.7/dist-packages/libvirt.py", line 337, in createWithFlags
(nova.exception): TRACE: if ret == 1: raise libvirtError ('virDomainCreateWithFlags() failed', dom=self)
(nova.exception): TRACE: libvirtError: internal error Process exited while reading console log output: char device redirected to /dev/pts/5
(nova.exception): TRACE: Failed to allocate 536870912 B: Cannot allocate memory
(nova.exception): TRACE:
(nova.exception): TRACE:
2011-11-25 18:05:32,956 ERROR nova.compute.manager [] Instance '98' failed to spawn. Is virtualization enabled in the BIOS? Details: internal error Process exited while reading console log output: char device redirected to /dev/pts/5
Failed to allocate 536870912 B: Cannot allocate memory
(nova.compute.manager): TRACE: Traceback (most recent call last):
(nova.compute.manager): TRACE: File "/opt/stack/nova/nova/compute/manager.py", line 424, in _run_instance
(nova.compute.manager): TRACE: network_info, block_device_info)
(nova.compute.manager): TRACE: File "/opt/stack/nova/nova/exception.py", line 129, in wrapped
(nova.compute.manager): TRACE: raise Error(str(e))
(nova.compute.manager): TRACE: Error: internal error Process exited while reading console log output: char device redirected to /dev/pts/5
(nova.compute.manager): TRACE: Failed to allocate 536870912 B: Cannot allocate memory
(nova.compute.manager): TRACE:
I tried to reproduce the bug in Essex
I tried to launch an instance when there is no available memory,am unable to create instance as the instance is getting created in ERROR state.
It seems that bug got fixed in Essex.