mirror of https://github.com/apache/cloudstack.git
do not propogate password changes if Attache is ConnectedAgentattache
This commit is contained in:
parent
5769fde46b
commit
9de370be61
|
|
@ -721,6 +721,9 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
|||
if (upasscmd.getClusterId() == null) {
|
||||
//update agent attache password
|
||||
AgentAttache agent = this.findAttache(upasscmd.getHostId());
|
||||
if (!(agent instanceof DirectAgentAttache)) {
|
||||
return false;
|
||||
}
|
||||
UpdateHostPasswordCommand cmd = new UpdateHostPasswordCommand(upasscmd.getUsername(), upasscmd.getPassword());
|
||||
agent.updatePassword(cmd);
|
||||
}
|
||||
|
|
@ -729,6 +732,9 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
|||
List<HostVO> hosts = _hostDao.listByCluster(upasscmd.getClusterId());
|
||||
for (HostVO h : hosts) {
|
||||
AgentAttache agent = this.findAttache(h.getId());
|
||||
if (!(agent instanceof DirectAgentAttache)) {
|
||||
continue;
|
||||
}
|
||||
UpdateHostPasswordCommand cmd = new UpdateHostPasswordCommand(upasscmd.getUsername(), upasscmd.getPassword());
|
||||
agent.updatePassword(cmd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -325,6 +325,9 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
|
|||
//update agent attache password
|
||||
try {
|
||||
Boolean result = _clusterMgr.propagateAgentEvent(upasscmd.getHostId(), Event.UpdatePassword);
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
} catch (AgentUnavailableException e) {
|
||||
}
|
||||
}
|
||||
|
|
@ -334,6 +337,9 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
|
|||
for (HostVO h : hosts) {
|
||||
try {
|
||||
Boolean result = _clusterMgr.propagateAgentEvent(h.getId(), Event.UpdatePassword);
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
} catch (AgentUnavailableException e) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue