VMWare: Resize action does not change disk

Bug #1291741 reported by Feng Xi Yan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Eric Brown

Bug Description

In "nova/virt/vmwareapi/vmops.py"

def finish_migration(self, context, migration, instance, disk_info,
                         network_info, image_meta, resize_instance=False,
                         block_device_info=None, power_on=True):
        """Completes a resize, turning on the migrated instance."""
        if resize_instance:
            client_factory = self._session._get_vim().client.factory
            vm_ref = vm_util.get_vm_ref(self._session, instance)
            vm_resize_spec = vm_util.get_vm_resize_spec(client_factory,
                                                        instance)
            reconfig_task = self._session._call_method(
                                            self._session._get_vim(),
                                            "ReconfigVM_Task", vm_ref,
                                            spec=vm_resize_spec)
.....................

finish_migration uses vm_util.get_vm_resize_spec() to get resize parameters.

But in "nova/virt/vmwareapi/vm_util.py"

def get_vm_resize_spec(client_factory, instance):
    """Provides updates for a VM spec."""
    resize_spec = client_factory.create('ns0:VirtualMachineConfigSpec')
    resize_spec.numCPUs = int(instance['vcpus'])
    resize_spec.memoryMB = int(instance['memory_mb'])
    return resize_spec

the get_vm_resize_spec action does not set up disk size to resize.

Tags: resize vmware
Tracy Jones (tjones-i)
Changed in nova:
status: New → Confirmed
assignee: nobody → Eric Brown (ericwb)
importance: Undecided → High
milestone: none → icehouse-rc1
Revision history for this message
John Garbutt (johngarbutt) wrote :

Is this a regression, there was a blueprint raised, by never implemented around this area?

Revision history for this message
Tracy Jones (tjones-i) wrote :

Just from reading it - it sounds like a simple bug that has always existed - but Eric is looking into it

Revision history for this message
Russell Bryant (russellb) wrote :

Since there's not a patch here yet and it's not a regression, I don't think we should block on it for RC1 at this point. I'm going to move this to the rc1-potential list.

tags: added: icehouse-rc1-potential
Changed in nova:
milestone: icehouse-rc1 → none
Eric Brown (ericwb)
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Eric Brown (ericwb) wrote :
Revision history for this message
Eric Brown (ericwb) wrote :

Looks like this problem existed in Havana also. So its not a regression.

vm_util.py:
def get_vm_resize_spec(client_factory, instance):
    """Provides updates for a VM spec."""
    resize_spec = client_factory.create('ns0:VirtualMachineConfigSpec')
    resize_spec.numCPUs = int(instance['vcpus'])
    resize_spec.memoryMB = int(instance['memory_mb'])
    return resize_spec

vmops.py:
    def finish_migration(self, context, migration, instance, disk_info,
                         network_info, image_meta, resize_instance=False,
                         block_device_info=None, power_on=True):
        """Completes a resize, turning on the migrated instance."""
        if resize_instance:
            client_factory = self._session._get_vim().client.factory
            vm_ref = vm_util.get_vm_ref(self._session, instance)
            vm_resize_spec = vm_util.get_vm_resize_spec(client_factory,
                                                        instance)
            reconfig_task = self._session._call_method(
                                            self._session._get_vim(),
                                            "ReconfigVM_Task", vm_ref,
                                            spec=vm_resize_spec)

Tracy Jones (tjones-i)
tags: added: icehouse-rc-potential
removed: icehouse-rc1-potential
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/82227

Tracy Jones (tjones-i)
tags: added: icehouse-rc1-potential
removed: icehouse-rc-potential
Tracy Jones (tjones-i)
tags: removed: icehouse-rc1-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in nova:
assignee: Eric Brown (ericwb) → Michael Still (mikalstill)
Changed in nova:
assignee: Michael Still (mikalstill) → Eric Brown (ericwb)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/85804
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=7ae506a4b1829fbd8cbecc0a6b267f76230face7
Submitter: Jenkins
Branch: master

commit 7ae506a4b1829fbd8cbecc0a6b267f76230face7
Author: Eric Brown <email address hidden>
Date: Mon Apr 7 13:27:47 2014 -0700

    VMware: Resize operation fails to change disk size

    The finish_migration step will resize the cpu and memory to match
    the new flavor chosen, but not the disk size. Additional code was
    added to extend the disk size using ExtendVirtualDisk_Task.

    DocImpact

    Change-Id: Iff10443f603d329d01a74a620079f80518b75a50
    Closes-bug: #1291741

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-3
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/127925

Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 2014.2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/icehouse)

Change abandoned by Cedric Brandily (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/127925

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.