mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-1137: force reconnect to a disconnected host throws error.
This commit is contained in:
parent
0ec4217aae
commit
85455f6514
|
|
@ -1036,6 +1036,11 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (host.getStatus() == Status.Disconnected) {
|
||||
s_logger.info("Host is already disconnected, no work to be done");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (host.getStatus() != Status.Up && host.getStatus() != Status.Alert && host.getStatus() != Status.Rebalancing) {
|
||||
s_logger.info("Unable to disconnect host because it is not in the correct state: host=" + hostId + "; Status=" + host.getStatus());
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue