Skip to content

Commit fc4dcea

Browse files
Sakshamsrajesh-battala
authored andcommitted
CLOUDSTACK-7582: Update Storage Pool API does not update tags correctly
1 parent 890f9ee commit fc4dcea

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ public void updateDetails(long poolId, Map<String, String> details) {
435435
detailsVO.add(new StoragePoolDetailVO(poolId, key, details.get(key), true));
436436
}
437437
_detailsDao.saveDetails(detailsVO);
438+
if(details.size() == 0) {
439+
_detailsDao.removeDetails(poolId);
440+
}
438441
}
439442
}
440443

server/src/com/cloud/storage/StorageManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ public PrimaryDataStoreInfo updateStoragePool(UpdateStoragePoolCmd cmd) throws I
799799
}
800800
}
801801

802-
if (updatedDetails.size() > 0) {
802+
if (updatedDetails.size() >= 0) {
803803
_storagePoolDao.updateDetails(id, updatedDetails);
804804
}
805805

0 commit comments

Comments
 (0)