rp- commented on code in PR #10093:
URL: https://github.com/apache/cloudstack/pull/10093#discussion_r1882183499


##########
plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java:
##########
@@ -311,12 +313,13 @@ public boolean connectPhysicalDisk(String volumePath, 
KVMStoragePool pool, Map<S
             throw new CloudRuntimeException(apiEx.getBestMessage(), apiEx);
         }
 
-        try
-        {
-            allow2PrimariesIfInUse(api, rscName);
-        } catch (ApiException apiEx) {
-            s_logger.error(apiEx);
-            // do not fail here as adding allow-two-primaries property is only 
a problem while live migrating
+        if (isVMMigration) {
+            try {
+                allow2PrimariesIfInUse(api, rscName);
+            } catch (ApiException apiEx) {
+                s_logger.error(apiEx);
+                // do not fail here as adding allow-two-primaries property is 
only a problem while live migrating
+            }

Review Comment:
   The simple check is, to see if on a cold start to see if the new debug line 
is in the logs.
   It should only be visible on live migrated (which it was on my tests).
   For the actual issue that started this, it is a bit more complicated and I 
couldn't fully reproduce it yet, as you need to let CloudStack start VM HA on a 
host, but the host shouldn't be fenced of. so basically freezing the CloudStack 
agent and having the other hosts say that this host is down, even tough it 
isn't.
   Which can happen if you use a non hyperconverged setup with the current 
Linstor HA code, there will be a follow up PR to fix this aswell.



-- 
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-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to