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 2021/09/16 09:21:36 UTC

[GitHub] [cloudstack] weizhouapache commented on a change in pull request #4708: kvm: Handle storage issue on NFS/KVM in multiple ways

weizhouapache commented on a change in pull request #4708:
URL: https://github.com/apache/cloudstack/pull/4708#discussion_r709942050



##########
File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/KVMHAMonitor.java
##########
@@ -77,84 +92,148 @@ public NfsStoragePool getStoragePool(String uuid) {
         }
     }
 
-    private class Monitor extends ManagedContextRunnable {
-
-        @Override
-        protected void runInContext() {
-            synchronized (_storagePool) {
-                Set<String> removedPools = new HashSet<String>();
-                for (String uuid : _storagePool.keySet()) {
-                    NfsStoragePool primaryStoragePool = _storagePool.get(uuid);
+    protected class CheckPoolThread extends Thread {

Review comment:
       ManagedContextRunnable and Thread are both implemetation of Runnable interface.
   Thread works in testing. 
   
   ManagedContextRunnable should also be ok. The following might work as well
   ```
   protected class CheckPoolThread implements Runnable {
   ```




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