@@ -825,6 +825,10 @@ protected boolean handleDisconnectWithInvestigation(AgentAttache attache, Status
825
825
826
826
if (determinedState == Status .Down ) {
827
827
s_logger .error ("Host is down: " + host .getId () + "-" + host .getName () + ". Starting HA on the VMs" );
828
+ if ((host .getType () != Host .Type .SecondaryStorage ) && (host .getType () != Host .Type .ConsoleProxy )) {
829
+ _alertMgr .sendAlert (AlertManager .AlertType .ALERT_TYPE_HOST , host .getDataCenterId (), host .getPodId (), "Host disconnected, " + host .getId (),
830
+ "Host is down: " + host .getId () + "-" + host .getName () + ". Starting HA on the VMs" );
831
+ }
828
832
event = Status .Event .HostDown ;
829
833
} else if (determinedState == Status .Up ) {
830
834
/* Got ping response from host, bring it back*/
@@ -857,20 +861,18 @@ protected boolean handleDisconnectWithInvestigation(AgentAttache attache, Status
857
861
HostPodVO podVO = _podDao .findById (host .getPodId ());
858
862
String hostDesc = "name: " + host .getName () + " (id:" + host .getId () + "), availability zone: " + dcVO .getName () + ", pod: " + podVO .getName ();
859
863
_alertMgr .sendAlert (AlertManager .AlertType .ALERT_TYPE_HOST , host .getDataCenterId (), host .getPodId (), "Host in ALERT state, " + hostDesc ,
860
- "In availability zone " + host .getDataCenterId ()
861
- + ", host is in alert state: " + host . getId () + "-" + host . getName () );
864
+ "In availability zone " + host .getDataCenterId () + ", " + host . getId () + "-" + host . getName ()
865
+ + " disconnect due to event " + event + ", ms can't determine the host status" );
862
866
}
863
867
} else {
864
868
s_logger .debug ("The next status of Agent " + host .getId () + " is not Alert, no need to investigate what happened" );
865
869
}
866
870
}
867
-
868
871
handleDisconnectWithoutInvestigation (attache , event , true , true );
869
872
host = _hostDao .findById (hostId ); // Maybe the host magically reappeared?
870
- if (host != null && ( host .getStatus () == Status .Alert || host . getStatus () == Status . Down ) ) {
873
+ if (host != null && host .getStatus () == Status .Down ) {
871
874
_haMgr .scheduleRestartForVmsOnHost (host , true );
872
875
}
873
-
874
876
return true ;
875
877
}
876
878
0 commit comments