ambari-cassandra-service
ambari-cassandra-service copied to clipboard
Support systemd status to return 0 exit code when status OK #4
CentOS 7 uses systemd. For some reason even when the cassandra
service is running OK, a service cassandra status
will return a non-zero exit code which causes the Ambari status handler to fail. This fix will use systemctl
to get the status when it exists on the path.
Let me test this out on some test Cluster. But if we will use systemctl, then I will use the same to start and stop the service as well. Although I tried using the current code on my centos 7 image and it is working without issues.
It does not work on my centos 7.2 . But with this change it is working fine. I also think the start and stop should also accommodate this change.