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

git commit: updated refs/heads/4.4 to 14a3d2b

Repository: cloudstack
Updated Branches:
  refs/heads/4.4 97623bb0d -> 14a3d2b62


make sure sync cannot block reboot

The recent discussed improvement has the risk that if 'sync' hangs, the reboot may be delayed in the same way as the 'reboot' command would do. To work around, we're adding a 5 second timeout. If it cannot sync in 5 seconds, it will not succeed anyway and we should proceed the reset.

@snuf: Could we use your OVM3 heartbeat script for other hypervisors as well? One way to do it seems like a nice idea :-)


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

Branch: refs/heads/4.4
Commit: 14a3d2b625d114b8a6d3970ca1f429b38b955b4d
Parents: 97623bb
Author: Remi Bergsma <gi...@remi.nl>
Authored: Thu Apr 9 12:18:21 2015 +0200
Committer: Daan Hoogland <dh...@schubergphilis.com>
Committed: Fri Apr 10 15:10:52 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14a3d2b6/scripts/vm/hypervisor/kvm/kvmheartbeat.sh
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/kvm/kvmheartbeat.sh b/scripts/vm/hypervisor/kvm/kvmheartbeat.sh
index ff6fd0a..7c8ee67 100755
--- a/scripts/vm/hypervisor/kvm/kvmheartbeat.sh
+++ b/scripts/vm/hypervisor/kvm/kvmheartbeat.sh
@@ -156,7 +156,8 @@ then
 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
+  sync &
+  sleep 5
   echo b > /proc/sysrq-trigger
   exit $?
 else