Just raise ComponentIsNotRunning() to report service not running, Thanks.

----- Original Message -----
From: "xiang dai" <xiang....@sky-data.cn>
To: dev@ambari.apache.org
Sent: Wednesday, April 11, 2018 10:28:32 AM
Subject: how to define status() for service

Hi! 

I am testing a simple script like below: 


def install(self, env): 
print 'install' 
def start(self, env): 
print 'start' 
def stop(self, env): 
print 'stop' 
def status(self, env): 
print 'status' 

It can install and start, but it can not stop as expected and print "wait 
actual stop". 

I view other seriver and find them call check_service_status with pid file as 
inout. 

If this service does not have a pid file, is there any api to check status?

Reply via email to