mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CS-16022: If host connection fails due to some DB error, host disconnect does not happen and mgmt_server_id is not removed.
Making sure host disconnect is called.
This commit is contained in:
parent
f57f96f7b7
commit
61a19eb089
@ -1639,6 +1639,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…
x
Reference in New Issue
Block a user