You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/04/04 10:48:08 UTC

git commit: updated refs/heads/master to c59308b

Repository: cloudstack
Updated Branches:
  refs/heads/master 799a03398 -> c59308b0e


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 #145

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c59308b0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c59308b0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c59308b0

Branch: refs/heads/master
Commit: c59308b0ee3cf8f7a4e791b8dad37e6cb9ac1103
Parents: 799a033
Author: Remi Bergsma <gi...@remi.nl>
Authored: Fri Apr 3 21:46:02 2015 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Sat Apr 4 14:17:37 2015 +0530

----------------------------------------------------------------------
 scripts/vm/hypervisor/kvm/kvmheartbeat.sh | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c59308b0/scripts/vm/hypervisor/kvm/kvmheartbeat.sh
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/kvm/kvmheartbeat.sh b/scripts/vm/hypervisor/kvm/kvmheartbeat.sh
index 0c07ffa..ff6fd0a 100755
--- a/scripts/vm/hypervisor/kvm/kvmheartbeat.sh
+++ b/scripts/vm/hypervisor/kvm/kvmheartbeat.sh
@@ -155,6 +155,8 @@ then
   exit 0
 elif [ "$cflag" == "1" ]
 then
+  /usr/bin/logger -t heartbeat "kvmheartbeat.sh rebooted system because it was unable to write the heartbeat to the storage."
+  sync
   echo b > /proc/sysrq-trigger
   exit $?
 else