log.debug("Invoked syncServerEndpoint with [name: " + serverName + ", address: " + serverAddr + "]");
}
ControlResults results = new ControlResults();
TopologyManagerLocal cloudMgr = LookupUtil.getTopologyManager();
Server server = cloudMgr.getServerByName(serverName);
if (server == null) {
log.warn("Failed to locate server. No address sync will be performed.");
results.setError("No update performed. Failed to find server " + server.getName());
return results;
}
if (serverAddr != null) {
SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
server.setAddress(serverAddr);
cloudMgr.updateServer(subjectMgr.getOverlord(), server);
}
int updateCount = notifyAgents(server);
Configuration complexResults = results.getComplexResults();