You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/11/17 02:33:06 UTC
[GitHub] [cloudstack] stephankruggg commented on a diff in pull request #6879: Check for null volume pool ID when tagging
stephankruggg commented on code in PR #6879:
URL: https://github.com/apache/cloudstack/pull/6879#discussion_r1024694856
##########
server/src/main/java/com/cloud/tags/TaggedResourceManagerImpl.java:
##########
@@ -318,8 +318,10 @@ public Map<String, String> getTagsFromResource(ResourceObjectType type, long res
private void informStoragePoolForVmTags(long vmId, String key, String value) {
List<VolumeVO> volumeVos = volumeDao.findByInstance(vmId);
for (VolumeVO volume : volumeVos) {
- DataStore dataStore = dataStoreMgr.getDataStore(volume.getPoolId(), DataStoreRole.Primary);
+ Long poolId = volume.getPoolId();
+ DataStore dataStore = retrieveDatastore(poolId);
if (dataStore == null || !(dataStore.getDriver() instanceof PrimaryDataStoreDriver)) {
+ s_logger.info(String.format("no data store found for vmId %d with poolId %d", vmId, poolId));
Review Comment:
```suggestion
s_logger.info(String.format("No data store found for VM %d with pool ID %d.", vmId, poolId));
```
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org