cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [06/50] [abbrv] git commit: updated refs/heads/reporter to 178a938
Date Wed, 04 Mar 2015 10:05:50 GMT
CLOUDSTACK-8282: startSystemVM should override consoleproxy.start setting

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit b462a56f27b21455b70415ea03663af5cd62647e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/reporter
Commit: 4f9bc70b1f777daeff5aeebd54144db50545e907
Parents: 6caee85
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Wed Feb 25 14:21:11 2015 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Wed Feb 25 14:30:13 2015 +0530

----------------------------------------------------------------------
 .../cloud/consoleproxy/AgentBasedConsoleProxyManager.java    | 2 +-
 server/src/com/cloud/consoleproxy/ConsoleProxyManager.java   | 2 +-
 .../src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java  | 8 ++++----
 server/src/com/cloud/server/ManagementServerImpl.java        | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f9bc70b/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java b/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java
index 3a1c387..6824b9c 100644
--- a/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java
+++ b/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java
@@ -175,7 +175,7 @@ public class AgentBasedConsoleProxyManager extends ManagerBase implements
Consol
     }
 
     @Override
-    public ConsoleProxyVO startProxy(long proxyVmId) {
+    public ConsoleProxyVO startProxy(long proxyVmId, boolean ignoreRestartSetting) {
         return null;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f9bc70b/server/src/com/cloud/consoleproxy/ConsoleProxyManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/consoleproxy/ConsoleProxyManager.java b/server/src/com/cloud/consoleproxy/ConsoleProxyManager.java
index 9d22b7f..8496301 100644
--- a/server/src/com/cloud/consoleproxy/ConsoleProxyManager.java
+++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManager.java
@@ -40,7 +40,7 @@ public interface ConsoleProxyManager extends Manager, ConsoleProxyService
{
 
     public void resumeLastManagementState();
 
-    public ConsoleProxyVO startProxy(long proxyVmId);
+    public ConsoleProxyVO startProxy(long proxyVmId, boolean ignoreRestartSetting);
 
     public boolean stopProxy(long proxyVmId);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f9bc70b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
index 0851a68..478aab1 100644
--- a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
+++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
@@ -520,7 +520,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
     }
 
     @Override
-    public ConsoleProxyVO startProxy(long proxyVmId) {
+    public ConsoleProxyVO startProxy(long proxyVmId, boolean ignoreRestartSetting) {
         try {
             ConsoleProxyVO proxy = _consoleProxyDao.findById(proxyVmId);
             if (proxy.getState() == VirtualMachine.State.Running) {
@@ -528,7 +528,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
             }
 
             String restart = _configDao.getValue(Config.ConsoleProxyRestart.key());
-            if (restart != null && restart.equalsIgnoreCase("false")) {
+            if (!ignoreRestartSetting && restart != null && restart.equalsIgnoreCase("false"))
{
                 return null;
             }
 
@@ -912,7 +912,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
 
             if (proxy != null) {
                 long proxyVmId = proxy.getId();
-                proxy = startProxy(proxyVmId);
+                proxy = startProxy(proxyVmId, false);
 
                 if (proxy != null) {
                     if (s_logger.isInfoEnabled()) {
@@ -1134,7 +1134,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements
ConsoleProxy
                 return false;
             }
         } else {
-            return startProxy(proxyVmId) != null;
+            return startProxy(proxyVmId, false) != null;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f9bc70b/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index 9de7f1d..aa158b4 100644
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -2183,7 +2183,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
     }
 
     private ConsoleProxyVO startConsoleProxy(long instanceId) {
-        return _consoleProxyMgr.startProxy(instanceId);
+        return _consoleProxyMgr.startProxy(instanceId, true);
     }
 
     private ConsoleProxyVO stopConsoleProxy(VMInstanceVO systemVm, boolean isForced) throws
ResourceUnavailableException, OperationTimedoutException, ConcurrentOperationException {


Mime
View raw message