<html><body>
<p><font size="2" face="sans-serif">While digging into </font><a href="https://bugs.launchpad.net/nova/+bug/1163844"><font size="2" face="sans-serif">https://bugs.launchpad.net/nova/+bug/1163844</font></a><font size="2" face="sans-serif"> concerning the Hyper-V driver, I noticed the behavior when the disk shrinks is inconsistent across all the hypervisors.</font><br>
<br>
<font size="2" face="sans-serif">libvirt: logs it cannot resize to smaller and just keeps the larger disk</font><br>
<br>
<font size="2" face="sans-serif">xen: tries to copy contents to a smaller disk, fails if too large</font><br>
<br>
<font size="2" face="sans-serif">hyperv: always errors out if new disk size is smaller</font><br>
<br>
<font size="2" face="sans-serif">powervm: silently keeps the larger disk</font><br>
<br>
<font size="2" face="sans-serif">vmware: (couldn't find where migration code handled resize)<br>
</font><br>
<font size="2" face="sans-serif">The only mention in the API guide - </font><a href="http://docs.openstack.org/api/openstack-compute/2/content/Resize_Server-d1e3707.html"><font size="3" color="#0000FF" face="serif"><u>http://docs.openstack.org/api/openstack-compute/2/content/Resize_Server-d1e3707.html</u></font></a><font size="3" face="serif"> </font><font size="2" face="sans-serif"> - is "</font><font size="2" face="Verdana">scaling the server up or down</font><font size="3" face="serif">."</font><br>
<br>
<font size="2" face="sans-serif">What is the * expected * behavior here? For metering reasons, my thought is that if the disk cannot be sized down an error should be thrown and that the libvirt and powervm should be modified. One issue with this approach is how we expose to the end-user what happened, I don't believe the ERROR state has any details. Additionally, auto-reverting the resize has the same side effect. I would like to explore standardizing the behavior in Havana, documenting in the API guide, and sync'ing in the hyperivsors.</font><br>
<br>
<font size="2" face="sans-serif">Thanks. </font><br>
<font size="2" face="sans-serif"><br>
Michael<br>
<br>
-------------------------------------------------<br>
Michael Fork<br>
Architect, OpenStack Development<br>
IBM Systems & Technology Group</font></body></html>