Description of problem: vm.sh presently only checks the health of the VM itself, not the health of any services inside. General support for in guest service health can be done on RHEL systems by running a cluster inside the guest. But for a more lightweight solution it would be advantageous to have a way to query the guest for state. if the in guest service implements a 'status check web page' then a simple curl command can be used to check the state of the services in the guest and use that information to make decisions about guest relocation/restart. This bug is to implement generic support in vm.sh for checking an in guest URL. So the changes would need to be configuration of the url to check. A http response of 200 should indicate the guest services are healthy, while a non 200 would cause rgmanager to fail over the vm.
Created attachment 415427 [details] Patch 1/4 Backport from STABLE3 branch
Created attachment 415428 [details] Patch 2/4
Created attachment 415430 [details] Patch 3/4
Created attachment 415433 [details] Patch 4/4
Patches pushed to cluster.git, but I can't link right now due to load on the Fedora servers.
http://git.fedorahosted.org/git?p=cluster.git;a=commit;h=2c75a3d41764244928b1a83f83a15351d09cdee3 http://git.fedorahosted.org/git?p=cluster.git;a=commit;h=39837b7bf28253a21a3ab805e8fedd44b7cb8ca2 http://git.fedorahosted.org/git?p=cluster.git;a=commit;h=7837036cc1b5a5c343a5bd4e041e1f7a91d50086 http://git.fedorahosted.org/git?p=cluster.git;a=commit;h=4c44c6e523a4c8521f55fc7330508c493da379f5
http://git.fedorahosted.org/git?p=cluster.git;a=commit;h=805e0bae5db683fb33ec2e3c14b12c6380885494
Created attachment 419476 [details] Patch 4/4
Created attachment 421344 [details] Status program specifically for RHEV (uses libcurl)
Without recompiling or introducing additional dependencies, you could insert the following into cluster.conf as the status program for the rhevm virtual machine: status_program="[ "$(curl -sk https://RHEVM_IP_ADDRESS/RHEVManagerWeb/HealthStatus.aspx -D - | head -1 | cut -f2 -d' ')" = "200" ]" With the above program, this is simplified somewhat: status_program="rhev-check RHEVM_IP_ADDRESS"
Created attachment 421354 [details] Shell script replacing option 1, making it easy to use but not introducing a universal dependency on libcurl
Created attachment 421370 [details] Updated status script with logging
*** Bug 591230 has been marked as a duplicate of this bug. ***
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0134.html