Skip to content

Commit 33e636d

Browse files
committed
Make the setting kvm specific
1 parent e6eeb0b commit 33e636d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
410410
public final static ConfigKey<Long> IOPS_MAX_WRITE_LENGTH = new ConfigKey<Long>(Long.class, "vm.disk.iops.maximum.write.length", "Advanced", "0",
411411
"Maximum IOPS write burst duration (seconds). If '0' (zero) then does not check for maximum burst length.", true, ConfigKey.Scope.Global, null);
412412

413-
public static final ConfigKey<Boolean> ADD_HOST_ON_SERVICE_RESTART = new ConfigKey<Boolean>(Boolean.class, "add.host.on.service.restart", "Advanced", "true",
413+
public static final ConfigKey<Boolean> ADD_HOST_ON_SERVICE_RESTART_KVM = new ConfigKey<Boolean>(Boolean.class, "add.host.on.service.restart.kvm", "Advanced", "true",
414414
"Indicates whether the host will be added back to cloudstack after restarting agent service on host. If false it wont be added back even after service restart",
415415
true, ConfigKey.Scope.Global, null);
416416

@@ -6383,6 +6383,6 @@ public String getConfigComponentName() {
63836383
@Override
63846384
public ConfigKey<?>[] getConfigKeys() {
63856385
return new ConfigKey<?>[] {SystemVMUseLocalStorage, IOPS_MAX_READ_LENGTH, IOPS_MAX_WRITE_LENGTH,
6386-
BYTES_MAX_READ_LENGTH, BYTES_MAX_WRITE_LENGTH, ADD_HOST_ON_SERVICE_RESTART};
6386+
BYTES_MAX_READ_LENGTH, BYTES_MAX_WRITE_LENGTH, ADD_HOST_ON_SERVICE_RESTART_KVM};
63876387
}
63886388
}

server/src/main/java/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
import com.cloud.utils.ssh.SSHCmdHelper;
6868
import com.trilead.ssh2.Connection;
6969

70-
import static com.cloud.configuration.ConfigurationManagerImpl.ADD_HOST_ON_SERVICE_RESTART;
70+
import static com.cloud.configuration.ConfigurationManagerImpl.ADD_HOST_ON_SERVICE_RESTART_KVM;
7171

7272
public abstract class LibvirtServerDiscoverer extends DiscovererBase implements Discoverer, Listener, ResourceStateAdapter {
7373
private static final Logger s_logger = Logger.getLogger(LibvirtServerDiscoverer.class);
@@ -477,7 +477,7 @@ public DeleteHostAnswer deleteHost(HostVO host, boolean isForced, boolean isForc
477477

478478
_resourceMgr.deleteRoutingHost(host, isForced, isForceDeleteStorage);
479479
try {
480-
ShutdownCommand cmd = new ShutdownCommand(ShutdownCommand.DeleteHost, null, !ADD_HOST_ON_SERVICE_RESTART.value());
480+
ShutdownCommand cmd = new ShutdownCommand(ShutdownCommand.DeleteHost, null, !ADD_HOST_ON_SERVICE_RESTART_KVM.value());
481481
agentMgr.send(host.getId(), cmd);
482482
} catch (AgentUnavailableException e) {
483483
s_logger.warn("Sending ShutdownCommand failed: ", e);

0 commit comments

Comments
 (0)