rhtyd commented on a change in pull request #5358:
URL: https://github.com/apache/cloudstack/pull/5358#discussion_r694564087



##########
File path: 
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
##########
@@ -311,7 +311,10 @@ public VolumeVO allocateDuplicateVolumeVO(Volume oldVol, 
Long templateId) {
     }
 
     private Optional<StoragePool> getPreferredStoragePool(List<StoragePool> 
poolList, VirtualMachine vm) {
-        String accountStoragePoolUuid = 
StorageManager.PreferredStoragePool.valueIn(vm.getAccountId());
+        String accountStoragePoolUuid = null;
+        if (vm != null) {
+            accountStoragePoolUuid = 
StorageManager.PreferredStoragePool.valueIn(vm.getAccountId());

Review comment:
       cc @nvazquez @davidjumani @sureshanaparti @weizhouapache - this needs 
validation, can you check what caused the regression and whether this fix 
actually fixes the regression or could potentially cause another one?




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


Reply via email to