summaryrefslogtreecommitdiff
path: root/trove/guestagent/api.py
diff options
context:
space:
mode:
authorLingxian Kong <anlin.kong@gmail.com>2020-07-22 15:41:21 +1200
committerLingxian Kong <anlin.kong@gmail.com>2020-07-24 13:55:51 +1200
commitba046b2a14459132ca10d30a1d2cc0a01126bb1d (patch)
treeb031cbdfa59bc43061d9921ec67879f5aac58b17 /trove/guestagent/api.py
parent39b0df0a6b87a6f2cb748cb81ac376088f34b88f (diff)
downloadtrove-ba046b2a14459132ca10d30a1d2cc0a01126bb1d.tar.gz
Support online volume resize
Trove now supports to resize volume without downtime. To use this feature, the version of Nova and Cinder needs to be at least Pike, the config option ``cinder_service_type`` needs to be set to ``volumev3``. The cloud admin can disable this feature by setting ``online_volume_resize=False``, default is enabled. Change-Id: I000a4e90800454972dd39f2f82d286571bc0b96c
Diffstat (limited to 'trove/guestagent/api.py')
-rw-r--r--trove/guestagent/api.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/trove/guestagent/api.py b/trove/guestagent/api.py
index 67c3baa5..329980b4 100644
--- a/trove/guestagent/api.py
+++ b/trove/guestagent/api.py
@@ -473,7 +473,7 @@ class API(object):
self.agent_low_timeout, version=version,
device_path=device_path, mount_point=mount_point)
- def resize_fs(self, device_path=None, mount_point=None):
+ def resize_fs(self, device_path=None, mount_point=None, online=False):
"""Resize the filesystem."""
LOG.debug("Resize device %(device)s on instance %(id)s.", {
'device': device_path, 'id': self.id})
@@ -481,7 +481,8 @@ class API(object):
self._call("resize_fs",
self.agent_high_timeout, version=version,
- device_path=device_path, mount_point=mount_point)
+ device_path=device_path, mount_point=mount_point,
+ online=online)
def update_overrides(self, overrides, remove=False):
"""Update the overrides."""