Mathieu,

Thank you for sharing this. Nice to see you have a solution that looks agreeable to Matt. Do you think you can get a spec pushed up and propose your code?

Jay



On 4/3/2017 2:21 PM, Mathieu Gagné wrote:
On Mon, Apr 3, 2017 at 12:27 PM, Walter Boring <wabor...@hemna.com> wrote:
Actually, this is incorrect.

The sticking point of this all was doing the coordination and initiation of
workflow from Nova.   Cinder already has the ability to call the driver to
do the resize of the volume.  Cinder just prevents this now, because there
is work that has to be done on the attached side to make the new size
actually show up.

What needs to happen is:
  A new Nova API needs to be created to initiate and coordinate this effort.
The API would call Cinder to extend the size, then get the connection
information from Cinder for that volume, then call os-brick to extend the
size, then update the domain xml to tell libvirt to extend the size.   The
end user inside the VM would have to issue the same SCSI bus rescan and
refresh that happens inside of os-brick, to make the kernel and filesystem
in the VM recognize the new size.

os-brick does all of the heavy lifting already on the host side of things.
The Connector API entry point:
https://github.com/openstack/os-brick/blob/master/os_brick/initiator/initiator_connector.py#L153

iSCSI example:
https://github.com/openstack/os-brick/blob/master/os_brick/initiator/connectors/iscsi.py#L370

os-brick's code works for single path and multipath attached volumes.
multipath has a bunch of added complexity with resize that should already be
taken care of here:
https://github.com/openstack/os-brick/blob/master/os_brick/initiator/linuxscsi.py#L375

I would like to share our private implementation (based on Mitaka):
https://gist.github.com/mgagne/9402089c11f8c80f6d6cd49f3db76512

The implementation makes it so Cinder leverages the existing Nova
external-events endpoint to trigger the BDM update and iSCSI rescan on
the host.

As always, the guest needs to update the partition table/filesystem if
it wants to benefit from the new free space.

Let me know if this is an implementation you want me to contribute upstream.

--
Mathieu

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to