Skip to content

Commit 780e6fe

Browse files
Slavka PelevaSlavka Peleva
authored andcommitted
mgmt: Fix volume update
Fix of uuid tag Removed template parameter when updating volume
1 parent b47b7df commit 780e6fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/driver/StorPoolPrimaryDataStoreDriver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,11 +1398,11 @@ private void updateVolumeWithTags(StoragePoolVO poolVO, VolumeInfo vInfo) {
13981398
SpConnectionDesc conn = StorPoolUtil.getSpConnection(poolVO.getUuid(), poolVO.getId(), storagePoolDetailsDao, primaryStoreDao);
13991399
String volName = StorPoolStorageAdaptor.getVolumeNameFromPath(vInfo.getPath(), true);
14001400
Pair<String, String> templateAndTier = getTemplateAndTier(vInfo, conn);
1401-
Map<String, String> tags = StorPoolHelper.addStorPoolTags(volName, getVMInstanceUUID(vInfo.getInstanceId()), "volume", getVcPolicyTag(vInfo.getInstanceId()), templateAndTier.first());
1401+
Map<String, String> tags = StorPoolHelper.addStorPoolTags(vInfo.getUuid(), getVMInstanceUUID(vInfo.getInstanceId()), "volume", getVcPolicyTag(vInfo.getInstanceId()), templateAndTier.first());
14021402
if (vInfo.getDeviceId() != null) {
14031403
tags.put("disk", vInfo.getDeviceId().toString());
14041404
}
1405-
StorPoolVolumeDef spVolume = new StorPoolVolumeDef(volName, null, tags, null, null, templateAndTier.second(), null, null, null);
1405+
StorPoolVolumeDef spVolume = new StorPoolVolumeDef(volName, null, tags, null, null, null, null, null, null);
14061406
StorPoolUtil.spLog("Updating volume's tags [%s] with template [%s]", tags, templateAndTier.second());
14071407
SpApiResponse resp = StorPoolUtil.volumeUpdate(spVolume, conn);
14081408
if (resp.getError() != null) {

0 commit comments

Comments
 (0)