I was trying to develop a service for cassandra. my question is regarding the service check method. I wrote some smoke test in service_check.py but when I install the service and do service check it tries to do service check on client node where cassandra service won't be running, so it fails. One work around I thought of is that I will provide host IP address in the smoke test so that the client executes the check on that node but then it is possible that that node is down and the service check will always fail in that case. Is there any way that I can get the IP address of all the hosts in the cluster from ambari and do Execute(smoke test) on each node unless it is passed on any one of them before ambari declare that service check failed. I see the Execute method will run the commands specified in it and if they execute correctly it will update the service check ran correctly. Below is sample code of service check.py Any help is appreciated
Currently the execute command will run on the machine on which ambari executes service check. Can you please correct my understanding how service check executes the command, how does it decides where to execute the commands( which machine?