xenapi driver fails with "global name 'instance' is not defined" during resize down

Bug #992098 reported by Johannes Erdfelt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Johannes Erdfelt

Bug Description

When enabling auto_disk_config and resizing an instance down, the xenapi driver will fail with this exception:

Traceback:
  File "/usr/lib/python2.6/dist-packages/nova/compute/manager.py", line 189, in decorated_function
    return function(self, context, instance_uuid, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/nova/compute/manager.py", line 1354, in resize_instance
    self._set_instance_error_state(context, instance_uuid)
  File "/usr/lib/python2.6/contextlib.py", line 23, in __exit__
    self.gen.next()
  File "/usr/lib/python2.6/dist-packages/nova/compute/manager.py", line 1349, in resize_instance
    instance_type_ref, self._legacy_nw_info(network_info))
  File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi/connection.py", line 237, in migrate_disk_and_power_off
    dest, instance_type)
  File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi/vmops.py", line 771, in migrate_disk_and_power_off
    instance_type)
  File "/usr/lib/python2.6/dist-packages/nova/virt/xenapi/vm_utils.py", line 470, in resize_disk
    new_ref = cls.create_vdi(session, sr_ref, instance, 'root',
NameError: global name 'instance' is not defined

Changed in nova:
assignee: nobody → Johannes Erdfelt (johannes.erdfelt)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/6934
Committed: http://github.com/openstack/nova/commit/8af5639cbb4d9d1c7732a644329d5c6853a87981
Submitter: Jenkins
Branch: master

commit 8af5639cbb4d9d1c7732a644329d5c6853a87981
Author: Johannes Erdfelt <email address hidden>
Date: Mon Apr 30 17:58:50 2012 +0000

    Pass instance to resize_disk() to fix exception

    Fixes bug 992098

    Change-Id: I844e153c2c7cb8ed4da6a4967537dd294377763c

Changed in nova:
status: In Progress → Fix Committed
Devin Carlen (devcamcar)
Changed in nova:
milestone: none → folsom-1
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-1 → 2012.2
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.