Add share_info parameter to reboot method for each driver (driver part)
This patch allow to pass share_info parameter to the reboot method. So it will allow to reboot instance and keep the shares attached. Manila is the OpenStack Shared Filesystems service. These series of patches implement changes required in Nova to allow the shares provided by Manila to be associated with and attached to instances using virtiofs. Implements: blueprint libvirt-virtiofs-attach-manila-shares Change-Id: I897cbd9ebc91938d0227d988b4bc833f2216618a
This commit is contained in:
@ -612,7 +612,7 @@ class ComputeDriver(object):
|
||||
|
||||
def reboot(self, context, instance, network_info, reboot_type,
|
||||
block_device_info=None, bad_volumes_callback=None,
|
||||
accel_info=None):
|
||||
accel_info=None, share_info=None):
|
||||
"""Reboot the specified instance.
|
||||
|
||||
After this is called successfully, the instance's state
|
||||
|
@ -220,7 +220,7 @@ class FakeDriver(driver.ComputeDriver):
|
||||
|
||||
def reboot(self, context, instance, network_info, reboot_type,
|
||||
block_device_info=None, bad_volumes_callback=None,
|
||||
accel_info=None):
|
||||
accel_info=None, share_info=None):
|
||||
# If the guest is not on the hypervisor and we're doing a hard reboot
|
||||
# then mimic the libvirt driver by spawning the guest.
|
||||
if (instance.uuid not in self.instances and
|
||||
|
@ -1387,7 +1387,7 @@ class IronicDriver(virt_driver.ComputeDriver):
|
||||
|
||||
def reboot(self, context, instance, network_info, reboot_type,
|
||||
block_device_info=None, bad_volumes_callback=None,
|
||||
accel_info=None):
|
||||
accel_info=None, share_info=None):
|
||||
"""Reboot the specified instance.
|
||||
|
||||
NOTE: Unlike the libvirt driver, this method does not delete
|
||||
|
@ -3998,7 +3998,7 @@ class LibvirtDriver(driver.ComputeDriver):
|
||||
|
||||
def reboot(self, context, instance, network_info, reboot_type,
|
||||
block_device_info=None, bad_volumes_callback=None,
|
||||
accel_info=None):
|
||||
accel_info=None, share_info=None):
|
||||
"""Reboot a virtual machine, given an instance reference."""
|
||||
if reboot_type == 'SOFT':
|
||||
# NOTE(vish): This will attempt to do a graceful shutdown/restart.
|
||||
@ -4019,7 +4019,7 @@ class LibvirtDriver(driver.ComputeDriver):
|
||||
"Trying hard reboot.",
|
||||
instance=instance)
|
||||
return self._hard_reboot(context, instance, network_info,
|
||||
objects.ShareMappingList(), block_device_info, accel_info
|
||||
share_info, block_device_info, accel_info
|
||||
)
|
||||
|
||||
def _soft_reboot(self, instance):
|
||||
|
@ -574,7 +574,7 @@ class VMwareVCDriver(driver.ComputeDriver):
|
||||
|
||||
def reboot(self, context, instance, network_info, reboot_type,
|
||||
block_device_info=None, bad_volumes_callback=None,
|
||||
accel_info=None):
|
||||
accel_info=None, share_info=None):
|
||||
"""Reboot VM instance."""
|
||||
self._vmops.reboot(instance, network_info, reboot_type)
|
||||
|
||||
|
@ -411,7 +411,7 @@ class ZVMDriver(driver.ComputeDriver):
|
||||
|
||||
def reboot(self, context, instance, network_info, reboot_type,
|
||||
block_device_info=None, bad_volumes_callback=None,
|
||||
accel_info=None):
|
||||
accel_info=None, share_info=None):
|
||||
|
||||
if reboot_type == 'SOFT':
|
||||
self._hypervisor.guest_reboot(instance.name)
|
||||
|
Reference in New Issue
Block a user