yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #52513
[Bug 1592849] Re: XenAPI: Invalid domid detection incorrect
Reviewed: https://review.openstack.org/330056
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=111b36504b241829c56a7d7d648231d73d572185
Submitter: Jenkins
Branch: master
commit 111b36504b241829c56a7d7d648231d73d572185
Author: Bob Ball <bob.ball@xxxxxxxxxx>
Date: Wed Jun 15 17:29:01 2016 +0100
XenAPI: Integers returned from XAPI are actually strings
In particular, we were expecting the domid to be an integer
when comparing against -1 in vmops.py to decide if the domain
was shut down. This test always failed, so domid of -1 was
assumed to be a live domain.
Fix all places where domid is an integer to ensure only string
comparisons are done.
If the domid is '-1' then we raise an exception based on the
instance. An instance is always passed, so make it clear that
this is non-optional
Change-Id: I8c0d3274fbf68351a1b077e791e50e449ea0af99
Closes-Bug: 1592849
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1592849
Title:
XenAPI: Invalid domid detection incorrect
Status in OpenStack Compute (nova):
Fix Released
Bug description:
https://git.openstack.org/cgit/openstack/nova/tree/nova/virt/xenapi/vmops.py#n2048
def _get_dom_id(self, instance=None, vm_ref=None, check_rescue=False):
vm_ref = vm_ref or self._get_vm_opaque_ref(instance, check_rescue)
domid = self._session.call_xenapi("VM.get_domid", vm_ref)
if not domid or domid == -1:
raise exception.InstanceNotFound(instance_id=instance['name'])
return domid
VM.get_domid will return a string, which will never be equal to an
integer.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1592849/+subscriptions
References