GutoVeronezi commented on a change in pull request #4871:
URL: https://github.com/apache/cloudstack/pull/4871#discussion_r601761405



##########
File path: server/src/main/java/com/cloud/storage/StorageManagerImpl.java
##########
@@ -1633,6 +1640,223 @@ public PrimaryDataStoreInfo 
cancelPrimaryStorageForMaintenance(CancelPrimaryStor
         return 
(PrimaryDataStoreInfo)_dataStoreMgr.getDataStore(primaryStorage.getId(), 
DataStoreRole.Primary);
     }
 
+    @Override
+    @ActionEvent(eventType = EventTypes.EVENT_SYNC_STORAGE_POOL, 
eventDescription = "synchronising storage pool with management server", async = 
true)
+    public StoragePool syncStoragePool(SyncStoragePoolCmd cmd) {
+        Long poolId = cmd.getPoolId();
+        StoragePoolVO pool = _storagePoolDao.findById(poolId);
+
+        if (pool == null) {
+            String msg = "Unable to obtain lock on the storage pool record 
while syncing storage pool with management server";

Review comment:
       Suggestion:
   
   We could improve logging here by adding the `poolId` in the message.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to