mirror of https://github.com/apache/cloudstack.git
bug 12605: if agent is in maintenance mode, don't reconnect to mgt server
status 12605: resolved fixed
This commit is contained in:
parent
afc61710b0
commit
86b51dedcf
|
|
@ -43,6 +43,8 @@ import com.cloud.agent.api.AgentControlCommand;
|
|||
import com.cloud.agent.api.Answer;
|
||||
import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.CronCommand;
|
||||
import com.cloud.agent.api.MaintainAnswer;
|
||||
import com.cloud.agent.api.MaintainCommand;
|
||||
import com.cloud.agent.api.ModifySshKeysCommand;
|
||||
import com.cloud.agent.api.PingCommand;
|
||||
import com.cloud.agent.api.ReadyCommand;
|
||||
|
|
@ -479,6 +481,11 @@ public class Agent implements HandlerFactory, IAgentControl {
|
|||
cancelTasks();
|
||||
_reconnectAllowed = false;
|
||||
answer = new Answer(cmd, true, null);
|
||||
} else if (cmd instanceof MaintainCommand) {
|
||||
s_logger.debug("Received maintainCommand" );
|
||||
cancelTasks();
|
||||
_reconnectAllowed = false;
|
||||
answer = new MaintainAnswer((MaintainCommand)cmd);
|
||||
} else if (cmd instanceof ReadyCommand) {
|
||||
ReadyCommand ready = (ReadyCommand)cmd;
|
||||
s_logger.debug("Received shutdownCommand, due to: " + ready.getDetails());
|
||||
|
|
|
|||
Loading…
Reference in New Issue