Repository: cloudstack
Updated Branches:
  refs/heads/master 726dd16da -> d14f66f58


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/d14f66f5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d14f66f5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d14f66f5

Branch: refs/heads/master
Commit: d14f66f58d23871dd641687c04ed539b2240a155
Parents: 726dd16
Author: Anthony Xu <[email protected]>
Authored: Mon Mar 24 17:15:08 2014 -0700
Committer: Anthony Xu <[email protected]>
Committed: Mon Mar 24 17:15:08 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/d14f66f5/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/d14f66f5/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(

Reply via email to