yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #60201
[Bug 1653080] Re: Booting from image in ceph is considered to booting from volume
*** This bug is a duplicate of bug 1587802 ***
https://bugs.launchpad.net/bugs/1587802
My apologies, I assumed we were talking about resizing up and I had to
re-read your description to see that this was actually about resizing
down. The following review moved _is_booted_from_volume to use
block_device_info and appears to correct this on master, I'll look into
a stable/newton backport shortly :
libvirt: Improve _is_booted_from_volume implementation
https://review.openstack.org/#/c/382024/
Again using my local env this now WORKSFORME when I attempt to resize
down :
$ sudo rbd -p vms ls -l
NAME SIZE PARENT FMT PROT LOCK
67e542f2-6a21-4363-818b-4ed58be529dd_disk 5120M images/ec027d6b-f677-40fd-b3c9-f0d30ef460de@snap 2
$ nova resize test-resize 1
$ grep ResizeError ../logs/n-cpu.log
2017-01-04 08:13:24.779 TRACE oslo_messaging.rpc.server ResizeError: Resize error: Unable to resize disk down.
$ sudo rbd -p vms ls -l
NAME SIZE PARENT FMT PROT LOCK
67e542f2-6a21-4363-818b-4ed58be529dd_disk 5120M images/ec027d6b-f677-40fd-b3c9-f0d30ef460de@snap 2
** Changed in: nova
Status: Incomplete => Triaged
** Changed in: nova
Importance: Undecided => Medium
** This bug has been marked a duplicate of bug 1587802
libvirt resize down prevention is invalid when using rbd as backend
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1653080
Title:
Booting from image in ceph is considered to booting from volume
Status in OpenStack Compute (nova):
Triaged
Bug description:
Openstack Mitaka
glance backend: ceph
nova backend: kvm+ceph
cinder backend: ceph
Steps to reproduce
==================
1.create an instance booting from image with flavor m1.small;
2.nova resize $instance_id m1.tiny;
Actual result
=============
instance resize successfully, but instance's root disk does not change
Expected result
===============
nova-api should raise a ResizeError exception.
booted_from_volume = self._is_booted_from_volume(instance, disk_info_text)
if (root_down and not booted_from_volume) or ephemeral_down:
reason = _("Unable to resize disk down.")
raise exception.InstanceFaultRollback(
exception.ResizeError(reason=reason))
I think the function "_is_booted_from_volume" is wrong:
@staticmethod
def _is_booted_from_volume(instance, disk_mapping):
return ((not bool(instance.get('image_ref')))
or 'disk' not in disk_mapping)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1653080/+subscriptions
References