File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -332,19 +332,21 @@ public boolean disconnectPhysicalDiskByPath(String localPath)
332332 ApiCallRcList answers = api .resourceDefinitionModify (rsc .get ().getName (), rdm );
333333 if (answers .hasError ())
334334 {
335- s_logger .error ("Failed to remove 'allow-two-primaries' on " + rsc .get ().getName ());
336- throw new CloudRuntimeException (answers .get (0 ).getMessage ());
335+ s_logger .error (
336+ String .format ("Failed to remove 'allow-two-primaries' on %s: %s" ,
337+ rsc .get ().getName (), LinstorUtil .getBestErrorMessage (answers )));
338+ // do not fail here as removing allow-two-primaries property isn't fatal
337339 }
338340
339341 return true ;
340342 }
341343 s_logger .warn ("Linstor: Couldn't find resource for this path: " + localPath );
342344 } catch (ApiException apiEx ) {
343- s_logger .error (apiEx );
344- throw new CloudRuntimeException ( apiEx . getBestMessage (), apiEx );
345+ s_logger .error (apiEx . getBestMessage () );
346+ // do not fail here as removing allow-two-primaries property isn't fatal
345347 }
346348 }
347- return false ;
349+ return true ;
348350 }
349351
350352 @ Override
You can’t perform that action at this time.
0 commit comments