Skip to content

Commit bd335d0

Browse files
committed
fix devcloud reboot issue: should not start heartbeat for devcloud
1 parent 8f63c2c commit bd335d0

2 files changed

Lines changed: 19 additions & 5 deletions

File tree

plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5019,6 +5019,16 @@ private void cleanupTemplateSR(Connection conn) {
50195019
}
50205020
}
50215021

5022+
protected boolean launchHeartBeat(Connection conn) {
5023+
String result = callHostPluginPremium(conn, "heartbeat", "host", _host.uuid, "interval", Integer
5024+
.toString(_heartbeatInterval));
5025+
if (result == null || !result.contains("> DONE <")) {
5026+
s_logger.warn("Unable to launch the heartbeat process on " + _host.ip);
5027+
return false;
5028+
}
5029+
return true;
5030+
}
5031+
50225032
protected SetupAnswer execute(SetupCommand cmd) {
50235033
Connection conn = getConnection();
50245034
setupServer(conn);
@@ -5032,12 +5042,11 @@ protected SetupAnswer execute(SetupCommand cmd) {
50325042
_canBridgeFirewall = can_bridge_firewall(conn);
50335043
}
50345044

5035-
String result = callHostPluginPremium(conn, "heartbeat", "host", _host.uuid, "interval", Integer
5036-
.toString(_heartbeatInterval));
5037-
if (result == null || !result.contains("> DONE <")) {
5038-
s_logger.warn("Unable to launch the heartbeat process on " + _host.ip);
5045+
boolean r = launchHeartBeat(conn);
5046+
if (!r) {
50395047
return null;
50405048
}
5049+
50415050
cleanupTemplateSR(conn);
50425051
Host host = Host.getByUuid(conn, _host.uuid);
50435052
try {
@@ -5051,7 +5060,7 @@ protected SetupAnswer execute(SetupCommand cmd) {
50515060
s_logger.debug("multipath is already set");
50525061
}
50535062
if (cmd.needSetup() ) {
5054-
result = callHostPlugin(conn, "vmops", "setup_iscsi", "uuid", _host.uuid);
5063+
String result = callHostPlugin(conn, "vmops", "setup_iscsi", "uuid", _host.uuid);
50555064
if (!result.contains("> DONE <")) {
50565065
s_logger.warn("Unable to setup iscsi: " + result);
50575066
return new SetupAnswer(cmd, result);

plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpOssResource.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ protected void fillHostInfo(Connection conn, StartupRoutingCommand cmd) {
7474
cmd.setCaps(cmd.getCapabilities() + " , hvm");
7575
}
7676

77+
@Override
78+
protected boolean launchHeartBeat(Connection conn) {
79+
return true;
80+
}
81+
7782
protected StartupStorageCommand initializeLocalSR(Connection conn) {
7883
SR extsr = getLocalEXTSR(conn);
7984
if (extsr != null) {

0 commit comments

Comments
 (0)