Comment 14 for bug 1558880

Revision history for this message
Matthew Booth (mbooth-9) wrote : Re: instance can not resize ephemeral in mitaka

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.