CLOUDSTACK-8067: Fixed NPEs in MS log related to console proxy VM

This commit is contained in:
Anshul Gangwar 2014-12-11 11:12:18 +05:30
parent 528bc80b4c
commit 1115bc9cc6
1 changed files with 7 additions and 6 deletions

View File

@ -208,12 +208,13 @@ public abstract class AgentHookBase implements AgentHook {
HostVO consoleProxyHost = findConsoleProxyHost(startupCmd);
assert (consoleProxyHost != null);
Answer answer = _agentMgr.send(consoleProxyHost.getId(), cmd);
if (answer == null || !answer.getResult()) {
s_logger.error("Console proxy agent reported that it failed to execute http handling startup command");
} else {
s_logger.info("Successfully sent out command to start HTTP handling in console proxy agent");
if (consoleProxyHost != null) {
Answer answer = _agentMgr.send(consoleProxyHost.getId(), cmd);
if (answer == null || !answer.getResult()) {
s_logger.error("Console proxy agent reported that it failed to execute http handling startup command");
} else {
s_logger.info("Successfully sent out command to start HTTP handling in console proxy agent");
}
}
}catch (NoSuchAlgorithmException e) {
s_logger.error("Unexpected exception in SecureRandom Algorithm selection ", e);