mirror of https://github.com/apache/cloudstack.git
CS-16022: If host connection fails due to some DB error, host disconnect does not happen and mgmt_server_id is not removed.
Reviewed-by: prachi
This commit is contained in:
parent
8e330fb69f
commit
c36880fe45
|
|
@ -1695,6 +1695,15 @@ public class ResourceManagerImpl implements ResourceManager, ResourceService, Ma
|
|||
if (cmds != null) {
|
||||
resource.disconnected();
|
||||
}
|
||||
if(host == null){
|
||||
if (cmds != null) {
|
||||
StartupCommand firstCmd = cmds[0];
|
||||
host = findHostByGuid(firstCmd.getGuid());
|
||||
if (host == null) {
|
||||
host = findHostByGuid(firstCmd.getGuidWithoutResource());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (host != null) {
|
||||
/* Change agent status to Alert */
|
||||
|
|
|
|||
Loading…
Reference in New Issue