Skip to content

Commit 278833e

Browse files
author
kishan
committed
Bug 13420: Send alert of type 18 when sending alert for SSVM
Status 13420: resolved fixed Reviewed-By: Nitin
1 parent e6beb08 commit 278833e

4 files changed

Lines changed: 9 additions & 1 deletion

File tree

server/src/com/cloud/alert/AlertManagerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,8 @@ public void sendAlert(short alertType, long dataCenterId, Long podId, Long clust
734734
if ((alertType != AlertManager.ALERT_TYPE_HOST) &&
735735
(alertType != AlertManager.ALERT_TYPE_USERVM) &&
736736
(alertType != AlertManager.ALERT_TYPE_DOMAIN_ROUTER) &&
737-
(alertType != AlertManager.ALERT_TYPE_CONSOLE_PROXY) &&
737+
(alertType != AlertManager.ALERT_TYPE_CONSOLE_PROXY) &&
738+
(alertType != AlertManager.ALERT_TYPE_SSVM) &&
738739
(alertType != AlertManager.ALERT_TYPE_STORAGE_MISC) &&
739740
(alertType != AlertManager.ALERT_TYPE_MANAGMENT_NODE)) {
740741
alert = _alertDao.getLastAlert(alertType, dataCenterId, podId, clusterId);

server/src/com/cloud/ha/HighAvailabilityManagerImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ public void scheduleRestart(VMInstanceVO vm, boolean investigate) {
299299
alertType = AlertManager.ALERT_TYPE_DOMAIN_ROUTER;
300300
} else if (VirtualMachine.Type.ConsoleProxy.equals(vm.getType())) {
301301
alertType = AlertManager.ALERT_TYPE_CONSOLE_PROXY;
302+
} else if (VirtualMachine.Type.SecondaryStorageVm.equals(vm.getType())) {
303+
alertType = AlertManager.ALERT_TYPE_SSVM;
302304
}
303305

304306
if (!(_forceHA || vm.isHaEnabled())) {
@@ -388,6 +390,8 @@ protected Long restart(HaWorkVO work) {
388390
alertType = AlertManager.ALERT_TYPE_DOMAIN_ROUTER;
389391
} else if (VirtualMachine.Type.ConsoleProxy.equals(vm.getType())) {
390392
alertType = AlertManager.ALERT_TYPE_CONSOLE_PROXY;
393+
} else if (VirtualMachine.Type.SecondaryStorageVm.equals(vm.getType())) {
394+
alertType = AlertManager.ALERT_TYPE_SSVM;
391395
}
392396

393397
HostVO host = _hostDao.findById(work.getHostId());

server/src/com/cloud/vm/VirtualMachineManagerImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1890,6 +1890,8 @@ protected Command compareState(long hostId, VMInstanceVO vm, final AgentVmInfo i
18901890
alertType = AlertManager.ALERT_TYPE_DOMAIN_ROUTER;
18911891
} else if (VirtualMachine.Type.ConsoleProxy.equals(vm.getType())) {
18921892
alertType = AlertManager.ALERT_TYPE_CONSOLE_PROXY;
1893+
} else if (VirtualMachine.Type.SecondaryStorageVm.equals(vm.getType())) {
1894+
alertType = AlertManager.ALERT_TYPE_SSVM;
18931895
}
18941896

18951897
HostPodVO podVO = _podDao.findById(vm.getPodIdToDeployIn());

usage/src/com/cloud/usage/UsageAlertManagerImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ public void sendAlert(short alertType, long dataCenterId, Long podId, String sub
208208
(alertType != AlertManager.ALERT_TYPE_USERVM) &&
209209
(alertType != AlertManager.ALERT_TYPE_DOMAIN_ROUTER) &&
210210
(alertType != AlertManager.ALERT_TYPE_CONSOLE_PROXY) &&
211+
(alertType != AlertManager.ALERT_TYPE_SSVM) &&
211212
(alertType != AlertManager.ALERT_TYPE_STORAGE_MISC) &&
212213
(alertType != AlertManager.ALERT_TYPE_MANAGMENT_NODE)) {
213214
alert = _alertDao.getLastAlert(alertType, dataCenterId, podId);

0 commit comments

Comments
 (0)