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 2020/08/05 11:45:17 UTC

[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #4228: Dont add host back after agent service restart

DaanHoogland commented on a change in pull request #4228:
URL: https://github.com/apache/cloudstack/pull/4228#discussion_r465667554



##########
File path: server/src/main/java/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java
##########
@@ -474,7 +477,8 @@ public DeleteHostAnswer deleteHost(HostVO host, boolean isForced, boolean isForc
 
         _resourceMgr.deleteRoutingHost(host, isForced, isForceDeleteStorage);
         try {
-            ShutdownCommand cmd = new ShutdownCommand(ShutdownCommand.DeleteHost, null);
+            ShutdownCommand cmd = AddHostOnServiceRestart.value() ? new ShutdownCommand(ShutdownCommand.DeleteHost, null, false) :
+                    new ShutdownCommand(ShutdownCommand.DeleteHost, "Cleaning up zone/pod/cluster details for host", true);

Review comment:
       general jist looks good, i'd rather have the tristate operator in the parameter passing then the whole contructor invocation ? note the ?)
   ```suggestion
               ShutdownCommand cmd = new ShutdownCommand(ShutdownCommand.DeleteHost, null, AddHostOnServiceRestart.value() ? false : true);
   ```




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

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