Comment 5 for bug 1870367

Revision history for this message
Lucio Seki (lseki) wrote :

Talked to lyarwood and sean-k-mooney at #openstack-nova [0] and did some tests.

In summary, n-cpu is able to extend an attached NFS volume by itself, but c-vol is preventing this from happening when it tries to perform `qemu-img resize`.

The should be fixed in 2 patches:

1. Add a condition to `image_utils.resize_image` [1], so c-vol will call `qemu-img resize`only when the volume is detached.
2. Implement `LibvirtNFSVolumeDriver.extend_volume` [2], so it won't raise `
NotImplementedError` [3].

On the n-cpu side, `LibvirtDriver.extend_volume` [4] will call `LibvirtNFSVolumeDriver.extend_volume` [5] implemented in step 2, and then `LibvirtDriver._resize_attached_volume` [6] will call `BlockDevice.resize`, which in turn calls `blockResize` [7] method that will perform the actual resize operation.

[0] http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2020-07-01.log.html#t2020-07-01T13:08:24
[1] https://github.com/openstack/cinder/blob/master/cinder/image/image_utils.py#L408
[2] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/volume/nfs.py#L20
[3] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/volume/volume.py#L153
[4] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L2105
[5] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L1665
[6] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L2053
[7] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/guest.py#L819