sureshanaparti commented on code in PR #8377:
URL: https://github.com/apache/cloudstack/pull/8377#discussion_r1431357772
##########
plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/driver/StorPoolPrimaryDataStoreDriver.java:
##########
@@ -190,6 +190,16 @@ public boolean grantAccess(DataObject data, Host host,
DataStore dataStore) {
@Override
public void revokeAccess(DataObject data, Host host, DataStore dataStore) {
+ if (DataObjectType.VOLUME == data.getType()) {
+ final VolumeVO volume = volumeDao.findById(data.getId());
+ if (volume.getInstanceId() == null) {
+ StorPoolUtil.spLog("Removing tags from detached volume=%s",
volume.toString());
+ Map<String, String> tags =
StorPoolHelper.addStorPoolTags(null, "", null, "");
+ SpConnectionDesc conn =
StorPoolUtil.getSpConnection(dataStore.getUuid(), dataStore.getId(),
storagePoolDetailsDao, primaryStoreDao);
+
StorPoolUtil.volumeUpadateTags(StorPoolStorageAdaptor.getVolumeNameFromPath(volume.getPath(),
true), tags, conn);
Review Comment:
```suggestion
StorPoolUtil.volumeRemoveTags(StorPoolStorageAdaptor.getVolumeNameFromPath(volume.getPath(),
true), conn);
```
update this if method is updated to _volumeRemoveTags_ as suggested
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]