Greg Hill created AMBARI-12238:
----------------------------------
Summary: ambari-server stop kills parent process
Key: AMBARI-12238
URL: https://issues.apache.org/jira/browse/AMBARI-12238
Project: Ambari
Issue Type: Bug
Components: ambari-server
Affects Versions: 2.0.1, 2.1.0
Reporter: Greg Hill
When you do ambari-server stop inside a script, it kills the calling script as
well. This is because ambari-server stop kills the entire process group, but
ambari-server start does not detach itself from the parent process.
'stop' kills the whole process group:
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/python/ambari-server.py#L145
'start' does not detach from its parent:
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/python/ambari_server_main.py#L276
If you add an os.setsid() call to the start process, I think that would fix the
bug, but more research/testing is needed:
https://docs.python.org/2/library/os.html#os.setsid
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)