dhslove commented on a change in pull request #5862:
URL: https://github.com/apache/cloudstack/pull/5862#discussion_r795032381



##########
File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtCheckVMActivityOnStoragePoolCommandWrapper.java
##########
@@ -43,9 +44,13 @@ public Answer execute(final 
CheckVMActivityOnStoragePoolCommand command, final L
         final ExecutorService executors = Executors.newSingleThreadExecutor();
         final KVMHAMonitor monitor = libvirtComputingResource.getMonitor();
         final StorageFilerTO pool = command.getPool();
-        if (Storage.StoragePoolType.NetworkFilesystem == pool.getType()){
+        if (Storage.StoragePoolType.NetworkFilesystem == pool.getType() || 
Storage.StoragePoolType.RBD == pool.getType()){
             final NfsStoragePool nfspool = 
monitor.getStoragePool(pool.getUuid());
-            final KVMHAVMActivityChecker ha = new 
KVMHAVMActivityChecker(nfspool, command.getHost().getPrivateNetwork().getIp(), 
command.getVolumeList(), libvirtComputingResource.getVmActivityCheckPath(), 
command.getSuspectTimeInSeconds());
+            final RbdStoragePool rbdpool = 
monitor.getRbdStoragePool(pool.getUuid());
+            String vmActivityCheckPath = "";
+            if (Storage.StoragePoolType.NetworkFilesystem == pool.getType())   
 vmActivityCheckPath = libvirtComputingResource.getVmActivityCheckPath();
+            else if (Storage.StoragePoolType.RBD == pool.getType())    
vmActivityCheckPath = libvirtComputingResource.getVmActivityCheckPathRbd();

Review comment:
       @GutoVeronezi   I modified the code as you requested.




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