Skip to content

Commit 578d2f6

Browse files
sudisonAnthony Xu
authored andcommitted
fix devcloud reboot issue: should not start heartbeat for devcloud
Conflicts: plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
1 parent 7590988 commit 578d2f6

2 files changed

Lines changed: 22 additions & 5 deletions

File tree

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

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4700,6 +4700,16 @@ private void cleanupTemplateSR(Connection conn) {
47004700
}
47014701
}
47024702

4703+
protected boolean launchHeartBeat(Connection conn) {
4704+
String result = callHostPluginPremium(conn, "heartbeat", "host", _host.uuid, "interval", Integer
4705+
.toString(_heartbeatInterval));
4706+
if (result == null || !result.contains("> DONE <")) {
4707+
s_logger.warn("Unable to launch the heartbeat process on " + _host.ip);
4708+
return false;
4709+
}
4710+
return true;
4711+
}
4712+
47034713
protected SetupAnswer execute(SetupCommand cmd) {
47044714
Connection conn = getConnection();
47054715
setupServer(conn);
@@ -4720,9 +4730,9 @@ protected SetupAnswer execute(SetupCommand cmd) {
47204730

47214731
}
47224732

4723-
String result = callHostPluginPremium(conn, "heartbeat", "host", _host.uuid, "interval", Integer.toString(_heartbeatInterval));
4724-
if (result == null || !result.contains("> DONE <")) {
4725-
s_logger.warn("Unable to launch the heartbeat process on " + _host.ip);
4733+
4734+
boolean r = launchHeartBeat(conn);
4735+
if (!r) {
47264736
return null;
47274737
}
47284738
cleanupTemplateSR(conn);
@@ -4737,8 +4747,10 @@ protected SetupAnswer execute(SetupCommand cmd) {
47374747
} catch (Types.MapDuplicateKey e) {
47384748
s_logger.debug("multipath is already set");
47394749
}
4740-
if (cmd.needSetup()) {
4741-
result = callHostPlugin(conn, "vmops", "setup_iscsi", "uuid", _host.uuid);
4750+
4751+
if (cmd.needSetup() ) {
4752+
String result = callHostPlugin(conn, "vmops", "setup_iscsi", "uuid", _host.uuid);
4753+
47424754
if (!result.contains("> DONE <")) {
47434755
s_logger.warn("Unable to setup iscsi: " + result);
47444756
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
@@ -79,6 +79,11 @@ protected void fillHostInfo(Connection conn, StartupRoutingCommand cmd) {
7979
cmd.setCaps(cmd.getCapabilities() + " , hvm");
8080
}
8181

82+
@Override
83+
protected boolean launchHeartBeat(Connection conn) {
84+
return true;
85+
}
86+
8287
protected StartupStorageCommand initializeLocalSR(Connection conn) {
8388
SR extsr = getLocalEXTSR(conn);
8489
if (extsr != null) {

0 commit comments

Comments
 (0)