CLOUDSTACK-8545 alert when out of band migration is detected and not

acted upon
This commit is contained in:
Daan Hoogland 2015-06-18 08:04:50 +02:00
parent 88fb8431f2
commit 85e2d9611f
1 changed files with 8 additions and 0 deletions

View File

@ -4480,7 +4480,15 @@ VirtualMachineGuru, Listener, Configurable, StateListener<State, VirtualMachine.
(newState == State.Running)) {
s_logger.info("Schedule a router reboot task as router " + vo.getId() + " is powered-on out-of-band. we need to reboot to refresh network rules");
_executor.schedule(new RebootTask(vo.getId()), 1000, TimeUnit.MICROSECONDS);
} else {
if (isOutOfBandMigrated(opaque)) {
final String title = "Router has been migrated out of band: " + vo.getInstanceName();
final String context =
"An out of band migration of router " + vo.getInstanceName() + "(" + vo.getUuid() + ") was detected. No automated action was performed.";
_alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_DOMAIN_ROUTER, vo.getDataCenterId(), vo.getPodIdToDeployIn(), title, context);
}
}
return true;
}