From fbc4ecb64026fe97c4b9d46bf80fe8a56b43911f Mon Sep 17 00:00:00 2001 From: shews Date: Mon, 4 Jan 2021 08:55:15 +0000 Subject: [PATCH] Always use new_size when extend Always use new_size when extend. Closes-Bug: #1909951 Change-Id: Ic5faa887448f363bb4d91bccfe8e035a06936454 --- manila/share/drivers/generic.py | 2 +- ...909951-fix-extend-have-wrong-size-7938eaa6591bd2ad.yaml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bug-1909951-fix-extend-have-wrong-size-7938eaa6591bd2ad.yaml diff --git a/manila/share/drivers/generic.py b/manila/share/drivers/generic.py index 7ecf6e5d12..4fe83a0a78 100644 --- a/manila/share/drivers/generic.py +++ b/manila/share/drivers/generic.py @@ -667,7 +667,7 @@ class GenericShareDriver(driver.ExecuteMixin, driver.ShareDriver): server_details['instance_id'], volume) - self._resize_filesystem(server_details, volume) + self._resize_filesystem(server_details, volume, new_size=new_size) self._mount_device(share, server_details, volume) helper.restore_access_after_maintenance(server_details, share['name']) diff --git a/releasenotes/notes/bug-1909951-fix-extend-have-wrong-size-7938eaa6591bd2ad.yaml b/releasenotes/notes/bug-1909951-fix-extend-have-wrong-size-7938eaa6591bd2ad.yaml new file mode 100644 index 0000000000..47bb48c138 --- /dev/null +++ b/releasenotes/notes/bug-1909951-fix-extend-have-wrong-size-7938eaa6591bd2ad.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixed a bug that if extend a volume after shrink it under generic + driver, it may have a wrong real size. Please see + `Launchpad bug `_ + for more details.