cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: updated refs/heads/4.4 to 0208de7
Date Wed, 25 Feb 2015 09:02:13 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 d4361b96d -> 0208de721


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>

Conflicts:
	server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java


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

Branch: refs/heads/4.4
Commit: 0208de721e4b1c232719415647ce53e39f698b29
Parents: d4361b9
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:31:57 2015 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0208de72/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 100755
--- 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/0208de72/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 100755
--- 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/0208de72/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 0512096..aee89c5 100755
--- a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
+++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
@@ -522,7 +522,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) {
@@ -530,7 +530,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;
             }
 
@@ -914,8 +914,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()) {
                     s_logger.info("Console proxy " + proxy.getHostName() + " is started");
@@ -1123,7 +1122,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/0208de72/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 93cb48d..ff9b339 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -2162,7 +2162,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