cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthon...@apache.org
Subject git commit: updated refs/heads/4.4 to a19d50e
Date Tue, 25 Mar 2014 00:50:47 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 a5b9814f7 -> a19d50ec1


when start vm times out, check VM status, if it is running , return succeed.
change XAPI timeout to 60 second.


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

Branch: refs/heads/4.4
Commit: a19d50ec1084846d6a783e461e4e15c3d0f43abd
Parents: a5b9814
Author: Anthony Xu <anthony.xu@citrix.com>
Authored: Mon Mar 24 17:15:08 2014 -0700
Committer: Anthony Xu <anthony.xu@citrix.com>
Committed: Mon Mar 24 17:16:19 2014 -0700

----------------------------------------------------------------------
 .../cloud/hypervisor/xen/resource/CitrixResourceBase.java | 10 +++++++++-
 server/src/com/cloud/configuration/Config.java            |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a19d50ec/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 3c6ddca..35bbcd1 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
@@ -3493,10 +3493,18 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
                 checkForSuccess(conn, task);
             } catch (Types.HandleInvalid e) {
                 if (vm.getPowerState(conn) == Types.VmPowerState.RUNNING) {
+                    s_logger.debug("VM " + vmName + " is in Running status");
                     task = null;
                     return;
                 }
-                throw new CloudRuntimeException("Shutdown VM catch HandleInvalid and VM is
not in RUNNING state");
+                throw new CloudRuntimeException("Start VM " + vmName + " catch HandleInvalid
and VM is not in RUNNING state");
+            } catch (Types.BadAsyncResult e) {
+                if (vm.getPowerState(conn) == Types.VmPowerState.RUNNING) {
+                    s_logger.debug("VM " + vmName + " is in Running status");
+                    task = null;
+                    return;
+                }
+                throw new CloudRuntimeException("Start VM " + vmName + " catch BadAsyncResult
and VM is not in RUNNING state");
             }
         } catch (XenAPIException e) {
             String msg = "Unable to start VM(" + vmName + ") on host(" + _host.uuid + ")
due to " + e.toString();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a19d50ec/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java
index f2fe68a..af1f062 100755
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -683,7 +683,7 @@ public enum Config {
             null),
     StorageCleanupEnabled("Advanced", StorageManager.class, Boolean.class, "storage.cleanup.enabled",
"true", "Enables/disables the storage cleanup thread.", null),
     UpdateWait("Advanced", AgentManager.class, Integer.class, "update.wait", "600", "Time
to wait (in seconds) before alerting on a updating agent", null),
-    XapiWait("Advanced", AgentManager.class, Integer.class, "xapiwait", "600", "Time (in
seconds) to wait for XAPI to return", null),
+    XapiWait("Advanced", AgentManager.class, Integer.class, "xapiwait", "60", "Time (in seconds)
to wait for XAPI to return", null),
     MigrateWait("Advanced", AgentManager.class, Integer.class, "migratewait", "3600", "Time
(in seconds) to wait for VM migrate finish", null),
     HAWorkers("Advanced", AgentManager.class, Integer.class, "ha.workers", "5", "Number of
ha worker threads.", null),
     MountParent(


Mime
View raw message