OpenStack Compute (Nova)

xen instance build fails when vcpu_weights set

Reported by Mark Washenberger on 2012-02-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Mark Washenberger

Bug Description

It looks like vcpu_weights needs to be cast to a string in order for this to work properly.

Here's an example stack trace

2012-02-29 15:52:20 ERROR nova.virt.xenapi.vmops [-] instance 41a65b58-1ac8-4a0a-8e3e-190b345f0685: Failed to spawn
(nova.virt.xenapi.vmops): TRACE: Traceback (most recent call last):
(nova.virt.xenapi.vmops): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi/vmops.py", line 240, in spawn
(nova.virt.xenapi.vmops): TRACE: self._spawn(instance, vm_ref)
(nova.virt.xenapi.vmops): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi/vmops.py", line 525, in _spawn
(nova.virt.xenapi.vmops): TRACE: self._configure_instance(ctx, instance, vm_ref, no_agent)
(nova.virt.xenapi.vmops): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi/vmops.py", line 474, in _configure_instance
(nova.virt.xenapi.vmops): TRACE: "weight", vcpu_weight)
(nova.virt.xenapi.vmops): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi_conn.py", line 600, in call_xenapi
(nova.virt.xenapi.vmops): TRACE: return tpool.execute(f, *args)
(nova.virt.xenapi.vmops): TRACE: File "/usr/lib/pymodules/python2.6/eventlet/tpool.py", line 76, in tworker
(nova.virt.xenapi.vmops): TRACE: rv = meth(*args,**kwargs)
(nova.virt.xenapi.vmops): TRACE: File "/usr/local/lib/python2.6/dist-packages/XenAPI.py", line 229, in __call__
(nova.virt.xenapi.vmops): TRACE: return self.__send(self.__name, args)
(nova.virt.xenapi.vmops): TRACE: File "/usr/local/lib/python2.6/dist-packages/XenAPI.py", line 133, in xenapi_request
(nova.virt.xenapi.vmops): TRACE: result = _parse_result(getattr(self, methodname)(*full_params))
(nova.virt.xenapi.vmops): TRACE: File "/usr/local/lib/python2.6/dist-packages/XenAPI.py", line 203, in _parse_result
(nova.virt.xenapi.vmops): TRACE: raise Failure(result['ErrorDescription'])
(nova.virt.xenapi.vmops): TRACE: Failure: ['FIELD_TYPE_ERROR', 'value']
(nova.virt.xenapi.vmops): TRACE:
2012-02-29 15:52:20 DEBUG nova.virt.xenapi.vmops [-] Instance 1927 failed to spawn - performing clean-up from (pid=19471) spawn /usr/lib/python2.6/dist-packages/nova/virt/xenapi/vmops.py:251
2012-02-29 15:52:20 DEBUG nova.virt.xenapi.vmops [-] Resources to remove:[{'file': None, 'vdi_type': u'os', 'vdi_uuid': u'ac7d261e-5b90-48db-b20b-5f5aebe7a6a7'}] from (pid=19471) _handle_spawn_error /usr/lib/python2.6/dist-packages/nova/virt/xenapi/vmops.py:540
2012-02-29 15:52:20 DEBUG nova.virt.xenapi.vmops [-] Removing VDI OpaqueRef:39c1203a-47eb-b434-a73a-4d9d7b665386(uuid:ac7d261e-5b90-48db-b20b-5f5aebe7a6a7) from (pid=19471) _handle_spawn_error /usr/lib/python2.6/dist-packages/nova/virt/xenapi/vmops.py:552
2012-02-29 15:52:21 WARNING nova.virt.xenapi_conn [-] Task [Async.VDI.destroy] OpaqueRef:521a40ba-3c74-9d43-391f-4e9dc193ff32 status: failure ['VDI_IN_USE', 'OpaqueRef:39c1203a-47eb-b434-a73a-4d9d7b665386']
2012-02-29 15:52:21 ERROR nova.virt.xenapi.vm_utils [-] ['VDI_IN_USE', 'OpaqueRef:39c1203a-47eb-b434-a73a-4d9d7b665386']
(nova.virt.xenapi.vm_utils): TRACE: Traceback (most recent call last):
(nova.virt.xenapi.vm_utils): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi/vm_utils.py", line 297, in destroy_vdi
(nova.virt.xenapi.vm_utils): TRACE: session.wait_for_task(task)
(nova.virt.xenapi.vm_utils): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi_conn.py", line 664, in wait_for_task
(nova.virt.xenapi.vm_utils): TRACE: raise self.XenAPI.Failure(error_info)
(nova.virt.xenapi.vm_utils): TRACE: Failure: ['VDI_IN_USE', 'OpaqueRef:39c1203a-47eb-b434-a73a-4d9d7b665386']
(nova.virt.xenapi.vm_utils): TRACE:
2012-02-29 15:52:21 ERROR nova.compute.manager [-] [instance: 41a65b58-1ac8-4a0a-8e3e-190b345f0685] Instance failed to spawn
(nova.compute.manager): TRACE: Traceback (most recent call last):
(nova.compute.manager): TRACE: File "/usr/lib/python2.6/dist-packages/nova/compute/manager.py", line 593, in _spawn
(nova.compute.manager): TRACE: self._legacy_nw_info(network_info), block_device_info)
(nova.compute.manager): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi_conn.py", line 225, in spawn
(nova.compute.manager): TRACE: self._vmops.spawn(context, instance, image_meta, network_info)
(nova.compute.manager): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi/vmops.py", line 252, in spawn
(nova.compute.manager): TRACE: self._handle_spawn_error(vdis, spawn_error)
(nova.compute.manager): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi/vmops.py", line 553, in _handle_spawn_error
(nova.compute.manager): TRACE: VMHelper.destroy_vdi(self._session, vdi_ref)
(nova.compute.manager): TRACE: File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi/vm_utils.py", line 301, in destroy_vdi
(nova.compute.manager): TRACE: _('Unable to destroy VDI %s') % vdi_ref)
(nova.compute.manager): TRACE: StorageError: Unable to destroy VDI OpaqueRef:39c1203a-47eb-b434-a73a-4d9d7b665386
(nova.compute.manager): TRACE:

Changed in nova:
assignee: nobody → Mark Washenberger (markwash)

Fix proposed to branch: master
Review: https://review.openstack.org/4709

Changed in nova:
status: New → In Progress

Reviewed: https://review.openstack.org/4709
Committed: http://github.com/openstack/nova/commit/fd915aa78d8fbc09395c77ca84728b361edab416
Submitter: Jenkins
Branch: master

commit fd915aa78d8fbc09395c77ca84728b361edab416
Author: Mark Washenberger <email address hidden>
Date: Wed Feb 29 13:54:27 2012 -0500

    Cast vcpu_weight to string before calling xen api

    Fixes bug 943490

    - style changes per s1rp

    Change-Id: If6444aa0bff35c54c6c3d57f97507b16b1e27d6a

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-03-20
Changed in nova:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers