We can check if mcollective is available without any additional tools and patches just by inserting a one-line condition into nailgun-agent.cron:
# timeout 5 ruby -rmcollective -e 'include MCollective::RPC; rpcclient("version", :options => { :config => "/etc/mcollective/server.cfg" }).get_version' # echo $? 0 (now setting invalid configuration in /etc/mcollective/server.cfg) # timeout 5 ruby -rmcollective -e 'include MCollective::RPC; rpcclient("version", :options => { :config => "/etc/mcollective/server.cfg" }).get_version' Could not create RPC client: Could not connect to RabbitMQ Server: SIGTERM # echo $? 124
We can check if mcollective is available without any additional tools and patches just by inserting a one-line condition into nailgun-agent.cron:
# timeout 5 ruby -rmcollective -e 'include MCollective::RPC; rpcclient( "version" , :options => { :config => "/etc/mcollecti ve/server. cfg" }).get_version' e/server. cfg) "version" , :options => { :config => "/etc/mcollecti ve/server. cfg" }).get_version'
# echo $?
0
(now setting invalid configuration in /etc/mcollectiv
# timeout 5 ruby -rmcollective -e 'include MCollective::RPC; rpcclient(
Could not create RPC client: Could not connect to RabbitMQ Server: SIGTERM
# echo $?
124