mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	CLOUDSTACK-8282: startSystemVM should override consoleproxy.start setting
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
		
							parent
							
								
									bbaf7d2d95
								
							
						
					
					
						commit
						b462a56f27
					
				@ -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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2182,7 +2182,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 {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user