@@ -2485,6 +2485,19 @@ public boolean finalizeCommandsOnStart(final Commands cmds, final VirtualMachine
24852485 if (reprogramGuestNtwks ) {
24862486 finalizeIpAssocForNetwork (cmds , router , provider , guestNetworkId , null );
24872487 finalizeNetworkRulesForNetwork (cmds , router , provider , guestNetworkId );
2488+
2489+ NetworkOffering offering = _networkOfferingDao .findById ((_networkDao .findById (guestNetworkId )).getNetworkOfferingId ());
2490+ //service monitoring is currently not added in RVR
2491+ if (!offering .getRedundantRouter ()) {
2492+ String serviceMonitringSet = _configDao .getValue (Config .EnableServiceMonitoring .key ());
2493+
2494+ if (serviceMonitringSet != null && serviceMonitringSet .equalsIgnoreCase ("true" )) {
2495+ finalizeMonitorServiceOnStrat (cmds , profile , router , provider , guestNetworkId , true );
2496+ } else {
2497+ finalizeMonitorServiceOnStrat (cmds , profile , router , provider , guestNetworkId , false );
2498+ }
2499+ }
2500+
24882501 }
24892502
24902503 finalizeUserDataAndDhcpOnStart (cmds , router , provider , guestNetworkId );
@@ -2495,15 +2508,6 @@ public boolean finalizeCommandsOnStart(final Commands cmds, final VirtualMachine
24952508 }
24962509
24972510
2498- String serviceMonitringSet = SetServiceMonitor .valueIn (router .getDataCenterId ());
2499- //String serviceMonitringSet = _configDao.getValue(Config.EnableServiceMonitoring.key());
2500-
2501- if (serviceMonitringSet != null && serviceMonitringSet .equalsIgnoreCase ("true" )) {
2502- finalizeMonitorServiceOnStrat (cmds , profile , router , provider , routerGuestNtwkIds .get (0 ), true );
2503- } else {
2504- finalizeMonitorServiceOnStrat (cmds , profile , router , provider , routerGuestNtwkIds .get (0 ), false );
2505- }
2506-
25072511 return true ;
25082512 }
25092513
0 commit comments