Compute service's run_instance method fails due to wrong datatype from db

Bug #657053 reported by Soren Hansen
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nova (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Attempting to run instances with current packages yields this:

2010-10-08 15:01:47+0200 [-] Traceback (most recent call last):
2010-10-08 15:01:47+0200 [-] File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 86, in run_instance
2010-10-08 15:01:47+0200 [-] yield self.driver.spawn(instance_ref)
2010-10-08 15:01:47+0200 [-] AttributeError: 'int' object has no attribute 'startswith'
2010-10-08 15:01:47+0200 [-] Unhandled error in Deferred:
2010-10-08 15:01:47+0200 [-] Unhandled Error
        Traceback (most recent call last):
          File "/usr/lib/pymodules/python2.6/nova/exception.py", line 76, in _wrap
            return f(*args, **kw)
          File "/usr/lib/pymodules/python2.6/nova/rpc.py", line 171, in receive
            d = defer.maybeDeferred(node_func, **node_args)
          File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 125, in maybeDeferred
            result = f(*args, **kw)
          File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 1014, in unwindGenerator
            return _inlineCallbacks(None, f(*args, **kwargs), Deferred())
        --- <exception caught here> ---
          File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 891, in _inlineCallbacks
            result = result.throwExceptionIntoGenerator(g)
          File "/usr/lib/python2.6/dist-packages/twisted/python/failure.py", line 338, in throwExceptionIntoGenerator
            return g.throw(self.type, self.value, self.tb)
          File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 98, in run_instance
            self._update_state(context, instance_id)
          File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 62, in _update_state
            state = self.driver.get_info(instance_ref.name)['state']
          File "/usr/lib/pymodules/python2.6/nova/virt/libvirt_conn.py", line 334, in get_info
            virt_dom = self._conn.lookupByName(instance_name)
          File "/usr/lib/python2.6/dist-packages/libvirt.py", line 1441, in lookupByName
            ret = libvirtmod.virDomainLookupByName(self._o, name)
        exceptions.TypeError: virDomainLookupByName() argument 2 must be string or None, not int

This is because the internal id changed from a string to an integer.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nova - 0.9.1~bzr331-0ubuntu2

---------------
nova (0.9.1~bzr331-0ubuntu2) maverick; urgency=low

  * Add a minimal patch to ensure a string gets returned as an
    instance's internal ID. (LP: #657053)
 -- Soren Hansen <email address hidden> Fri, 08 Oct 2010 23:16:58 +0200

Changed in nova (Ubuntu):
status: New → Fix Released
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.