cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: updated refs/heads/4.3 to bd335d0
Date Thu, 06 Feb 2014 22:20:30 GMT
Updated Branches:
  refs/heads/4.3 8f63c2cf9 -> bd335d01c


fix devcloud reboot issue: should not start heartbeat for devcloud


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bd335d01
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bd335d01
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bd335d01

Branch: refs/heads/4.3
Commit: bd335d01cb6c1bbedac3d8e49fa108ea83ca4459
Parents: 8f63c2c
Author: edison <sudison@gmail.com>
Authored: Thu Feb 6 14:19:29 2014 -0800
Committer: edison <sudison@gmail.com>
Committed: Thu Feb 6 14:19:29 2014 -0800

----------------------------------------------------------------------
 .../xen/resource/CitrixResourceBase.java         | 19 ++++++++++++++-----
 .../hypervisor/xen/resource/XcpOssResource.java  |  5 +++++
 2 files changed, 19 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bd335d01/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index bf9b068..48ccf70 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -5019,6 +5019,16 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
         }
     }
 
+    protected boolean launchHeartBeat(Connection conn) {
+        String result = callHostPluginPremium(conn, "heartbeat", "host", _host.uuid, "interval",
Integer
+                .toString(_heartbeatInterval));
+        if (result == null || !result.contains("> DONE <")) {
+            s_logger.warn("Unable to launch the heartbeat process on " + _host.ip);
+            return false;
+        }
+        return true;
+    }
+
     protected SetupAnswer execute(SetupCommand cmd) {
         Connection conn = getConnection();
         setupServer(conn);
@@ -5032,12 +5042,11 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
             	_canBridgeFirewall = can_bridge_firewall(conn);
             }
 
-            String result = callHostPluginPremium(conn, "heartbeat", "host", _host.uuid,
"interval", Integer
-                    .toString(_heartbeatInterval));
-            if (result == null || !result.contains("> DONE <")) {
-                s_logger.warn("Unable to launch the heartbeat process on " + _host.ip);
+            boolean r = launchHeartBeat(conn);
+            if (!r) {
                 return null;
             }
+
             cleanupTemplateSR(conn);
             Host host = Host.getByUuid(conn, _host.uuid);
             try {
@@ -5051,7 +5060,7 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
                 s_logger.debug("multipath is already set");
             }
             if (cmd.needSetup() ) {
-                result = callHostPlugin(conn, "vmops", "setup_iscsi", "uuid", _host.uuid);
+                String result = callHostPlugin(conn, "vmops", "setup_iscsi", "uuid", _host.uuid);
                 if (!result.contains("> DONE <")) {
                     s_logger.warn("Unable to setup iscsi: " + result);
                     return new SetupAnswer(cmd, result);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bd335d01/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpOssResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpOssResource.java
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpOssResource.java
index 5260c55..919d083 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpOssResource.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpOssResource.java
@@ -74,6 +74,11 @@ public class XcpOssResource extends CitrixResourceBase {
     	cmd.setCaps(cmd.getCapabilities() + " , hvm");
     }
 
+    @Override
+    protected boolean launchHeartBeat(Connection conn) {
+        return true;
+    }
+
     protected StartupStorageCommand initializeLocalSR(Connection conn) {
         SR extsr = getLocalEXTSR(conn);
         if (extsr != null) {


Mime
View raw message