This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.20 by this push:
     new f0a0936675c server: fix volume offering not updated after offering 
change (#12003)
f0a0936675c is described below

commit f0a0936675c8a0462b5677f767c8fb56b161423a
Author: Abhishek Kumar <[email protected]>
AuthorDate: Wed Nov 12 14:21:51 2025 +0530

    server: fix volume offering not updated after offering change (#12003)
    
    Signed-off-by: Abhishek Kumar <[email protected]>
---
 server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java | 2 +-
 ui/public/locales/en.json                                        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java 
b/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
index 440da7e2c72..308991f77d5 100644
--- a/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
@@ -1536,6 +1536,7 @@ public class VolumeApiServiceImpl extends ManagerBase 
implements VolumeApiServic
                 }
             }
 
+            volume = _volsDao.findById(volumeId);
             if (newDiskOfferingId != null) {
                 volume.setDiskOfferingId(newDiskOfferingId);
                 _volumeMgr.saveVolumeDetails(newDiskOfferingId, 
volume.getId());
@@ -1550,7 +1551,6 @@ public class VolumeApiServiceImpl extends ManagerBase 
implements VolumeApiServic
             }
 
             // Update size if volume has same size as before, else it is 
already updated
-            volume = _volsDao.findById(volumeId);
             if (currentSize == volume.getSize() && currentSize != newSize) {
                 volume.setSize(newSize);
             } else if (volume.getSize() != newSize) {
diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json
index d18c0945d3b..8f2e1bb5c05 100644
--- a/ui/public/locales/en.json
+++ b/ui/public/locales/en.json
@@ -2845,7 +2845,7 @@
 "message.change.offering.confirm": "Please confirm that you wish to change the 
service offering of this virtual Instance.",
 "message.change.offering.for.volume": "Successfully changed offering for the 
volume",
 "message.change.offering.for.volume.failed": "Change offering for the volume 
failed",
-"message.change.offering.processing": "Changing offering for the volume...",
+"message.change.offering.for.volume.processing": "Changing offering for the 
volume...",
 "message.change.password": "Please change your password.",
 "message.change.scope.failed": "Scope change failed",
 "message.change.scope.processing": "Scope change in progress",

Reply via email to