Hi all.
I'm developing my own stack for Ambari and right now I have a problem with
component status determination procedure.
I have something like this in my master component code:
def status(self,env):
code, out = shell.call("systemctl status my-service | grep Active: | awk
'{ print $2 }'", logoutput=True)
state = (False,True)[out == "active"]
if not state:
raise ComponentIsNotRunning()
If I use this code - component state in web ui is always marked as stopped.
Can someone suggest what am I doing wrong ? What return value is expected
in status method to identify component as "running" ?
Thanks in advance.