From 8af5639cbb4d9d1c7732a644329d5c6853a87981 Mon Sep 17 00:00:00 2001 From: Johannes Erdfelt Date: Mon, 30 Apr 2012 17:58:50 +0000 Subject: Pass instance to resize_disk() to fix exception Fixes bug 992098 Change-Id: I844e153c2c7cb8ed4da6a4967537dd294377763c --- nova/virt/xenapi/vm_utils.py | 2 +- nova/virt/xenapi/vmops.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 084005a93..64aca60ac 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -452,7 +452,7 @@ class VMHelper(xenapi.HelperBase): session.call_plugin('glance', 'upload_vhd', kwargs) @classmethod - def resize_disk(cls, session, vdi_ref, instance_type): + def resize_disk(cls, session, instance, vdi_ref, instance_type): # Copy VDI over to something we can resize # NOTE(jerdfelt): Would be nice to just set vdi_ref to read/write sr_ref = cls.safe_find_sr(session) diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 2cbdeea0b..72d458cd0 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -744,6 +744,7 @@ class VMOps(object): # 3. Copy VDI, resize partition and filesystem, forget VDI, # truncate VHD new_ref, new_uuid = VMHelper.resize_disk(self._session, + instance, vdi_ref, instance_type) self._update_instance_progress(context, instance, -- cgit