rafaelweingartner closed pull request #2658: improve KVM hosts reset (by not
rebooting in script)
URL: https://github.com/apache/cloudstack/pull/2658
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/scripts/vm/hypervisor/kvm/kvmheartbeat.sh
b/scripts/vm/hypervisor/kvm/kvmheartbeat.sh
index 7c8ee67f30c..d8e273f47e2 100755
--- a/scripts/vm/hypervisor/kvm/kvmheartbeat.sh
+++ b/scripts/vm/hypervisor/kvm/kvmheartbeat.sh
@@ -155,10 +155,9 @@ 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 &
- sleep 5
- echo b > /proc/sysrq-trigger
+ pids=$(lsof | grep -F "$MountPoint" | awk '// { print $2 }')
+ /usr/bin/logger -t heartbeat "kvmheartbeat.sh terminated $pids because it
was unable to write the heartbeat to the storage."
+ kill $pids
exit $?
else
write_hbLog
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services