Resize instance from large flavor to small flavor based on Hyperv driver, instance status is error and the phsical instance get destroyed
Bug #1163844 reported by
GuoHui Liu
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Alessandro Pilotti |
Bug Description
Test script:
1.Use flavor2 to deploy instance.
2.When deployment success , resize it from flavor2 to flavor1.
3.Instance status display error.
Flavor1 information:
1 CPU
512M memory
0G disk
Flavor2 information:
1 CPU
2048M memory
20G disk
the root cause is, in current hyperv driver implementation, when to perform finish_migration operation, there is a check that the VHD can't be resize to a smaller size.
if new_size < curr_size:
but at this point, the old instance get already destroyed, so the data could be lost.
Changed in nova: | |
assignee: | GuoHui LIu (guohliu) → nobody |
Changed in nova: | |
assignee: | nobody → GuoHui LIu (guohliu) |
tags: |
added: hyper-v removed: hyperv |
Changed in nova: | |
milestone: | none → havana-1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | havana-1 → 2013.2 |
To post a comment you must log in.
Started thread on the mailing list: http:// lists.openstack .org/pipermail/ openstack- dev/2013- April/007478. html
The behavior when the disk shrinks is inconsistent across all the hypervisors.
libvirt: logs it cannot resize to smaller and just keeps the larger disk
xen: tries to copy contents to a smaller disk, fails if too large
hyperv: always errors out if new disk size is smaller
powervm: silently keeps the larger disk
vmware: (couldn't find where migration code handled resize)
The only mention in the API guide - http:// docs.openstack. org/api/ openstack- compute/ 2/content/ Resize_ Server- d1e3707. html - is "scaling the server up or down."
Since Hyper-V always fails on a smaller disk and it can lead to being unable to access a VM, I would propose the behavior from libvirt and powervm be adopted and that this be addressed in the Nova v3 API and explicitly fail if we cannot resize down.