Difference between revisions of "Cfengine: Testing ssh connectivity to the CE"
From GridPP Wiki
Colin morey (Talk | contribs) |
(No difference)
|
Latest revision as of 10:48, 13 December 2006
One of the common causes of the infamous maradona failure, is a node that is unable to transfer job information back to the ce, this cfengine snippet tests the node can ssh to the ce and alerts if not.
###################################################################### # # Configuration file for Testing ssh into the ce # cf.ce-ssh-test # ###################################################################### control: ssh_to_ce01_test = ( ExecResult("/usr/bin/su - NONROOTUSER -c ${quote}/usr/bin/ssh CEHOSTNAME /bin/hostname${quote}") ) classes: ssh_to_ce01 = ( Regcmp(".*CEHOSTNAME.*",${ssh_to_ce01_test} ) ) alerts: !ssh_to_ce01:: "Unable to ssh to CEHOSTNAME! Error was :- $(ssh_to_ce01_test)"
Hope this helps someone.