Skip to content

Commit c59308b

Browse files
remibergsmayadvr
authored andcommitted
write logfile just before rebooting the host
As discussed with @wido @pyr and @NuxRo added an extra log line. Tested it and it logs fine (tested to local disk) when syncing first: Apr 3 15:31:23 mcctest2 heartbeat: kvmheartbeat.sh system because it was unable to write the heartbeat to the storage By the way, it did also log to the agent.log but this extra log has the benefit of ending up in the system log so you'll probably find it easier there. Existing logs: 2015-04-03 15:27:23,943 WARN [kvm.resource.KVMHAMonitor] (Thread-24:null) write heartbeat failed: timeout, retry: 0 2015-04-03 15:28:23,944 WARN [kvm.resource.KVMHAMonitor] (Thread-24:null) write heartbeat failed: timeout, retry: 1 2015-04-03 15:29:23,946 WARN [kvm.resource.KVMHAMonitor] (Thread-24:null) write heartbeat failed: timeout, retry: 2 2015-04-03 15:30:23,948 WARN [kvm.resource.KVMHAMonitor] (Thread-24:null) write heartbeat failed: timeout, retry: 3 2015-04-03 15:31:23,950 WARN [kvm.resource.KVMHAMonitor] (Thread-24:null) write heartbeat failed: timeout, retry: 4 2015-04-03 15:31:23,950 WARN [kvm.resource.KVMHAMonitor] (Thread-24:null) write heartbeat failed: timeout; reboot the host This closes apache#145 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 799a033 commit c59308b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

scripts/vm/hypervisor/kvm/kvmheartbeat.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ then
155155
exit 0
156156
elif [ "$cflag" == "1" ]
157157
then
158+
/usr/bin/logger -t heartbeat "kvmheartbeat.sh rebooted system because it was unable to write the heartbeat to the storage."
159+
sync
158160
echo b > /proc/sysrq-trigger
159161
exit $?
160162
else

0 commit comments

Comments
 (0)