summaryrefslogtreecommitdiff
path: root/nova/virt/driver.py
diff options
context:
space:
mode:
authorMathieu Gagné <mgagne@iweb.com>2017-07-12 10:59:55 -0400
committerMatt Riedemann <mriedem.os@gmail.com>2017-07-12 11:53:20 -0400
commitbbe0f313bdfd30cc1c740709543b679567b42f0f (patch)
tree293262f3f08237d2af2722f86787818080c30704 /nova/virt/driver.py
parentd2d84eb102023d75911ca848c1d30a9f81e6f40f (diff)
downloadnova-bbe0f313bdfd30cc1c740709543b679567b42f0f.tar.gz
Add ability to signal and perform online volume size change
Allow Cinder to use external events to signal a volume extension. 1) Nova will then call os-brick to perform the volume extension so the host can detect its new size. 2) Compute driver will resize the device in QEMU so instance can detect the new disk size without rebooting. This change: * Adds the 'volume-extended' external event. The event tag needs to be the extended volume id. * Bumps the latest microversion to 2.51. * Exposes non-traceback instance action event details for non-admins on the microversion. This is needed for the non-admin API user that initiated the volume extend operation to be able to tell when the nova-compute side is complete. Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com> Blueprint: nova-support-attached-volume-extend Change-Id: If10cffd0dc4c9879f6754ce39bee5fae1d04f474
Diffstat (limited to 'nova/virt/driver.py')
-rw-r--r--nova/virt/driver.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/nova/virt/driver.py b/nova/virt/driver.py
index c043404202..87cb782eff 100644
--- a/nova/virt/driver.py
+++ b/nova/virt/driver.py
@@ -129,6 +129,7 @@ class ComputeDriver(object):
"supports_device_tagging": False,
"supports_tagged_attach_interface": False,
"supports_tagged_attach_volume": False,
+ "supports_extend_volume": False,
}
def __init__(self, virtapi):
@@ -478,6 +479,18 @@ class ComputeDriver(object):
"""
raise NotImplementedError()
+ def extend_volume(self, connection_info, instance):
+ """Extend the disk attached to the instance.
+
+ :param dict connection_info:
+ The connection for the extended volume.
+ :param nova.objects.instance.Instance instance:
+ The instance whose volume gets extended.
+
+ :return: None
+ """
+ raise NotImplementedError()
+
def attach_interface(self, context, instance, image_meta, vif):
"""Use hotplug to add a network interface to a running instance.