The disk.local thing is a distraction, as that code is always a no-op in practice. The resize is done by the _create_image call.
For reference, the bug happened way before this in ComputeManager._finish_migration where we do:
if old_instance_type_id != new_instance_type_id: instance_type = instance.get_flavor('new') self._set_instance_info(instance, instance_type)
for key in ('root_gb', 'swap', 'ephemeral_gb'):
if old_instance_type[key] != instance_type[key]: resize_instance = True break
The problem is that ephemeral disks are defined by BDMs, and not by instance.ephemeral_gb. The above code updates ephemeral_gb, but not the BDM. The libvirt driver is only looking in the BDM, so it doesn't see the resize.
The disk.local thing is a distraction, as that code is always a no-op in practice. The resize is done by the _create_image call.
For reference, the bug happened way before this in ComputeManager. _finish_ migration where we do:
if old_instance_ type_id != new_instance_ type_id:
instance_ type = instance. get_flavor( 'new')
self. _set_instance_ info(instance, instance_type) type[key] != instance_type[key]:
resize_ instance = True
break
for key in ('root_gb', 'swap', 'ephemeral_gb'):
if old_instance_
The problem is that ephemeral disks are defined by BDMs, and not by instance. ephemeral_ gb. The above code updates ephemeral_gb, but not the BDM. The libvirt driver is only looking in the BDM, so it doesn't see the resize.