protected ReadyAnswer execute(ReadyCommand cmd) {
try {
OvmHost.Details d = OvmHost.getDetails(_conn);
//TODO: cleanup halted vm
if (d.masterIp.equalsIgnoreCase(_ip)) {
return new ReadyAnswer(cmd);
} else {
s_logger.debug("Master IP changes to " + d.masterIp + ", it should be " + _ip);
return new ReadyAnswer(cmd, "I am not the master server");
}
} catch (XmlRpcException e) {
s_logger.debug("XML RPC Exception" + e.getMessage(), e);
throw new CloudRuntimeException("XML RPC Exception" + e.getMessage(), e);
}