Uncaught exception for create server with Cannot allocate memory

Bug #901827 reported by Nachi Ueno
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Unassigned
OpenStack Quality Assurance
Invalid
Undecided
Unassigned

Bug Description

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:

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Changed in nova:
status: Confirmed → In Progress
assignee: nobody → shilpa batchu (shilpa-batchu)
Revision history for this message
shilpa batchu (shilpa-batchu) wrote :

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.

Thierry Carrez (ttx)
Changed in nova:
status: In Progress → Invalid
Changed in nova:
assignee: shilpa batchu (shilpa-batchu) → nobody
Revision history for this message
Mathivathani (mathivathani-s) wrote :
Download full text (8.4 KiB)

Got the same problem.VM went to error state and log shows Cannot allocate memory

013-05-09 23:42:45.007 AUDIT nova.compute.manager [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc43-9c3d-40b2-8aae-5ceeff319523] Starting instance...
2013-05-09 23:42:45.250 AUDIT nova.compute.claims [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc43-9c3d-40b2-8aae-5ceeff319523] Attempting claim: memory 8192 MB, disk 80 GB, VCPUs 4
2013-05-09 23:42:45.251 AUDIT nova.compute.claims [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc43-9c3d-40b2-8aae-5ceeff319523] Total Memory: 11912 MB, used: 93696 MB
2013-05-09 23:42:45.252 AUDIT nova.compute.claims [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc43-9c3d-40b2-8aae-5ceeff319523] Memory limit not specified, defaulting to unlimited
2013-05-09 23:42:45.253 AUDIT nova.compute.claims [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc43-9c3d-40b2-8aae-5ceeff319523] Total Disk: 6 GB, used: 760 GB
2013-05-09 23:42:45.253 AUDIT nova.compute.claims [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc43-9c3d-40b2-8aae-5ceeff319523] Disk limit not specified, defaulting to unlimited
2013-05-09 23:42:45.254 AUDIT nova.compute.claims [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc43-9c3d-40b2-8aae-5ceeff319523] Total CPU: 8 VCPUs, used: 68 VCPUs
2013-05-09 23:42:45.254 AUDIT nova.compute.claims [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc43-9c3d-40b2-8aae-5ceeff319523] CPU limit not specified, defaulting to unlimited
2013-05-09 23:42:45.255 AUDIT nova.compute.claims [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc43-9c3d-40b2-8aae-5ceeff319523] Claim successful
2013-05-09 23:43:07.373 INFO nova.virt.libvirt.driver [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc43-9c3d-40b2-8aae-5ceeff319523] Creating image
2013-05-09 23:43:07.538 INFO nova.virt.libvirt.firewall [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc43-9c3d-40b2-8aae-5ceeff319523] Called setup_basic_filtering in nwfilter
2013-05-09 23:43:07.539 INFO nova.virt.libvirt.firewall [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc43-9c3d-40b2-8aae-5ceeff319523] Ensuring static filters
2013-05-09 23:43:08.610 ERROR nova.compute.manager [req-c9263db7-4a5a-46f0-9dec-83c685532d9e 67db0e01cd484add99ec9219874920b7 b8f3447eb2bf49499c9e7af2ca048be9] [instance: 768ecc4...

Read more...

Nachi Ueno (nati-ueno)
Changed in openstack-qa:
status: New → Invalid
zyjyan (xdzhaoyuanjie)
Changed in nova:
status: Invalid → Fix Released
Sean Dague (sdague)
no longer affects: nova/diablo
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.