@@ -738,13 +738,14 @@ public void sendAlert(AlertType alertType, DataCenter dataCenter, Pod pod, Clust
738
738
AlertVO alert = null ;
739
739
Long clusterId = cluster == null ? null : cluster .getId ();
740
740
Long podId = pod == null ? null : pod .getId ();
741
+ long dcId = dataCenter == null ? 0L : dataCenter .getId ();
741
742
if ((alertType != AlertManager .AlertType .ALERT_TYPE_HOST ) && (alertType != AlertManager .AlertType .ALERT_TYPE_USERVM )
742
743
&& (alertType != AlertManager .AlertType .ALERT_TYPE_DOMAIN_ROUTER ) && (alertType != AlertManager .AlertType .ALERT_TYPE_CONSOLE_PROXY )
743
744
&& (alertType != AlertManager .AlertType .ALERT_TYPE_SSVM ) && (alertType != AlertManager .AlertType .ALERT_TYPE_STORAGE_MISC )
744
745
&& (alertType != AlertManager .AlertType .ALERT_TYPE_MANAGEMENT_NODE ) && (alertType != AlertManager .AlertType .ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED )
745
746
&& (alertType != AlertManager .AlertType .ALERT_TYPE_UPLOAD_FAILED ) && (alertType != AlertManager .AlertType .ALERT_TYPE_OOBM_AUTH_ERROR )
746
747
&& (alertType != AlertManager .AlertType .ALERT_TYPE_HA_ACTION ) && (alertType != AlertManager .AlertType .ALERT_TYPE_CA_CERT )) {
747
- alert = _alertDao .getLastAlert (alertType .getType (), dataCenter . getId () , podId , clusterId );
748
+ alert = _alertDao .getLastAlert (alertType .getType (), dcId , podId , clusterId );
748
749
}
749
750
750
751
if (alert == null ) {
@@ -754,7 +755,7 @@ public void sendAlert(AlertType alertType, DataCenter dataCenter, Pod pod, Clust
754
755
newAlert .setContent (content );
755
756
newAlert .setClusterId (clusterId );
756
757
newAlert .setPodId (podId );
757
- newAlert .setDataCenterId (dataCenter . getId () );
758
+ newAlert .setDataCenterId (dcId );
758
759
newAlert .setSentCount (1 );
759
760
newAlert .setLastSent (new Date ());
760
761
newAlert .setName (alertType .getName ());
0 commit comments