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



##########
File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtFenceCommandWrapper.java
##########
@@ -47,20 +48,25 @@ public Answer execute(final FenceCommand command, final 
LibvirtComputingResource
         final ExecutorService executors = Executors.newSingleThreadExecutor();
         final KVMHAMonitor monitor = libvirtComputingResource.getMonitor();
 
-        final List<NfsStoragePool> pools = monitor.getStoragePools();
+        final List<NfsStoragePool> nfspools = monitor.getStoragePools();
+        final List<RbdStoragePool> rbdpools = monitor.getRbdStoragePools();
 
         /**
          * We can only safely fence off hosts when we use NFS
          * On NFS primary storage pools hosts continuesly write
          * a heartbeat. Disable Fencing Off for hosts without NFS
          */
-        if (pools.size() == 0) {
+        if (nfspools.size() == 0) {
             String logline = "No NFS storage pools found. No way to safely 
fence " + command.getVmName() + " on host " + command.getHostGuid();
             s_logger.warn(logline);
             return new FenceAnswer(command, false, logline);
+        }else if (rbdpools.size() == 0) {

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