You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2022/12/12 07:24:03 UTC
[cloudstack] branch main updated: storpool: fix on remove the Iops limits (#6902)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 66747d04c4b storpool: fix on remove the Iops limits (#6902)
66747d04c4b is described below
commit 66747d04c4b69a394d1e28dd3b5f1bd62e4e08bd
Author: slavkap <51...@users.noreply.github.com>
AuthorDate: Mon Dec 12 09:23:54 2022 +0200
storpool: fix on remove the Iops limits (#6902)
Remove the Iops limits when resizing a volume with disk offering without iops limits or with a custom Iops limits in offerings.
---
.../storage/datastore/driver/StorPoolPrimaryDataStoreDriver.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/driver/StorPoolPrimaryDataStoreDriver.java b/plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/driver/StorPoolPrimaryDataStoreDriver.java
index c5c2bc71a40..c62680a956a 100644
--- a/plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/driver/StorPoolPrimaryDataStoreDriver.java
+++ b/plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/driver/StorPoolPrimaryDataStoreDriver.java
@@ -273,9 +273,11 @@ public class StorPoolPrimaryDataStoreDriver implements PrimaryDataStoreDriver {
try {
SpConnectionDesc conn = StorPoolUtil.getSpConnection(data.getDataStore().getUuid(), data.getDataStore().getId(), storagePoolDetailsDao, primaryStoreDao);
- StorPoolUtil.spLog("StorpoolPrimaryDataStoreDriverImpl.resize: name=%s, uuid=%s, oldSize=%d, newSize=%s, shrinkOk=%s", name, vol.getUuid(), oldSize, payload.newSize, payload.shrinkOk);
+ long maxIops = payload.newMaxIops == null ? Long.valueOf(0) : payload.newMaxIops;
- SpApiResponse resp = StorPoolUtil.volumeUpdate(name, payload.newSize, payload.shrinkOk, payload.newMaxIops, conn);
+ StorPoolUtil.spLog("StorpoolPrimaryDataStoreDriverImpl.resize: name=%s, uuid=%s, oldSize=%d, newSize=%s, shrinkOk=%s, maxIops=%s", name, vol.getUuid(), oldSize, payload.newSize, payload.shrinkOk, maxIops);
+
+ SpApiResponse resp = StorPoolUtil.volumeUpdate(name, payload.newSize, payload.shrinkOk, maxIops, conn);
if (resp.getError() != null) {
err = String.format("Could not resize StorPool volume %s. Error: %s", name, resp.getError());
} else {