when using ceph as backend, instance can resize to a smaller flavor, and vm_state become error in the end.
nova/virt/libvirt/driver.py:
@staticmethod
def _is_booted_from_volume(instance, disk_mapping): """Determines whether the VM is booting from volume
Determines whether the disk mapping indicates that the VM
is booting from a volume.
"""
return ((not bool(instance.get('image_ref')))
or 'disk' not in disk_mapping)
when using rbd as backend, the function cannot find 'disk' in disk_mapping, and treat it as booted_from_volume
when using ceph as backend, instance can resize to a smaller flavor, and vm_state become error in the end.
nova/virt/ libvirt/ driver. py: from_volume( instance, disk_mapping):
"""Determines whether the VM is booting from volume
@staticmethod
def _is_booted_
Determines whether the disk mapping indicates that the VM get('image_ ref')))
is booting from a volume.
"""
return ((not bool(instance.
or 'disk' not in disk_mapping)
when using rbd as backend, the function cannot find 'disk' in disk_mapping, and treat it as booted_from_volume