[openstack-dev] [nova] Do any hyperviors allow disk reduction as part of resize ?

Gary Kotton gkotton at vmware.com
Fri Jun 13 15:01:29 UTC 2014


I think that is a very good point. This should maybe be addressed in the API layer as you have suggested.
Thanks
Gary

From: <Day>, Phil Day <philip.day at hp.com<mailto:philip.day at hp.com>>
Reply-To: OpenStack List <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Date: Friday, June 13, 2014 at 4:22 PM
To: OpenStack List <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Subject: Re: [openstack-dev] [nova] Do any hyperviors allow disk reduction as part of resize ?

I guess the question I'm really asking here is:  "Since we know resize down won't work in all cases, and the failure if it does occur will be hard for the user to detect, should we just block it at the API layer and be consistent across all Hypervisors ?"

From: Andrew Laski [mailto:andrew.laski at rackspace.com]
Sent: 13 June 2014 13:57
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [nova] Do any hyperviors allow disk reduction as part of resize ?


On 06/13/2014 08:03 AM, Day, Phil wrote:
>Theoretically impossible to reduce disk unless you have some really nasty guest additions.

That's what I thought - but many of the drivers seem to at least partially support it based on the code, hence the question on here to find out of that is really supported and works - or is just inconsistent error checking across drivers.

My grumpy dev answer is that what works is not resizing down.  I'm familiar with the xen driver resize operation and will say that it does work when the guest filesystem and partition sizes are accommodating, but there's no good way to know whether or not it will succeed without actually trying it.  So when it fails it's after someone was waiting on a resize that seemed like it was working and then suddenly didn't.

If we want to aim for what's going to work consistently across drivers, it's probably going to end up being not resizing disks down.



From: Aryeh Friedman [mailto:aryeh.friedman at gmail.com]
Sent: 13 June 2014 11:12
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [nova] Do any hyperviors allow disk reduction as part of resize ?

Theoretically impossible to reduce disk unless you have some really nasty guest additions.

On Fri, Jun 13, 2014 at 6:02 AM, Day, Phil <philip.day at hp.com<mailto:philip.day at hp.com>> wrote:
Hi Folks,

I was looking at the resize code in libvirt, and it has checks which raise an exception if the target root or ephemeral disks are smaller than the current ones - which seems fair enough I guess (you can't drop arbitary disk content on resize), except that the  because the check is in the virt driver the effect is to just ignore the request (the instance remains active rather than going to resize-verify).

It made me wonder if there were any hypervisors that actually allow this, and if not wouldn't it be better to move the check to the API layer so that the request can be failed rather than silently ignored ?

As far as I can see:

baremetal: Doesn't support resize

hyperv: Checks only for root disk (https://github.com/openstack/nova/blob/master/nova/virt/hyperv/migrationops.py#L99-L108<https://urldefense.proofpoint.com/v1/url?u=https://github.com/openstack/nova/blob/master/nova/virt/hyperv/migrationops.py%23L99-L108&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=eH0pxTUZo8NPZyF6hgoMQu%2BfDtysg45MkPhCZFxPEq8%3D%0A&m=1meUXb4syMIPy2G%2BHcsy3qccL7i2ULAgEaQdNbTNnOk%3D%0A&s=18797dc88941e101a48538fe1b7e74595d19af8bd10c4305df404b5309ee66f2>  )

libvirt:     fails for a reduction of either root or ephemeral  (https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L4918-L4923<https://urldefense.proofpoint.com/v1/url?u=https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py%23L4918-L4923&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=eH0pxTUZo8NPZyF6hgoMQu%2BfDtysg45MkPhCZFxPEq8%3D%0A&m=1meUXb4syMIPy2G%2BHcsy3qccL7i2ULAgEaQdNbTNnOk%3D%0A&s=a00cd8642bba9bd0a6b788f3aabdeace918e86a6129ace3bce316a9d3a613592> )

vmware:   doesn't seem to check at all ?

xen: Allows resize down for root but not for ephemeral (https://github.com/openstack/nova/blob/master/nova/virt/xenapi/vmops.py#L1015-L1032<https://urldefense.proofpoint.com/v1/url?u=https://github.com/openstack/nova/blob/master/nova/virt/xenapi/vmops.py%23L1015-L1032&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=eH0pxTUZo8NPZyF6hgoMQu%2BfDtysg45MkPhCZFxPEq8%3D%0A&m=1meUXb4syMIPy2G%2BHcsy3qccL7i2ULAgEaQdNbTNnOk%3D%0A&s=7507996a7fb34b0497f85386caf7980f73d0c90fe2f59e15b3c4c87e30157e82> )


It feels kind of clumsy to have such a wide variation of behavior across the drivers, and to have the check performed only in the driver ?

Phil


_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org<mailto:OpenStack-dev at lists.openstack.org>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



--
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org<https://urldefense.proofpoint.com/v1/url?u=http://www.PetiteCloud.org&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=eH0pxTUZo8NPZyF6hgoMQu%2BfDtysg45MkPhCZFxPEq8%3D%0A&m=1meUXb4syMIPy2G%2BHcsy3qccL7i2ULAgEaQdNbTNnOk%3D%0A&s=19cddab8fe6377092f1064218f7edae62d6caf857ead8a5fb23bd2a1942d74ea>




_______________________________________________

OpenStack-dev mailing list

OpenStack-dev at lists.openstack.org<mailto:OpenStack-dev at lists.openstack.org>

http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140613/2f0b0f34/attachment.html>


More information about the OpenStack-dev mailing list