ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [16/24] ambari git commit: AMBARI-14973. ambari-agent upstart script restart triggers the restart of hbase specific JVM processes (aonishuk)
Date Wed, 10 Feb 2016 16:13:13 GMT
AMBARI-14973. ambari-agent upstart script restart triggers the restart of hbase specific JVM
processes (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ef1b98b3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ef1b98b3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ef1b98b3

Branch: refs/heads/branch-dev-patch-upgrade
Commit: ef1b98b3c77a5b4ebafbd5cc9c720ad9f13b63e8
Parents: 4294500
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Tue Feb 9 17:40:11 2016 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Tue Feb 9 17:40:11 2016 +0200

----------------------------------------------------------------------
 ambari-agent/src/main/python/ambari_agent/PythonExecutor.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ef1b98b3/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
index 0d431bc..d75fc0c 100644
--- a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
+++ b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
@@ -166,6 +166,9 @@ class PythonExecutor(object):
       else:
         structured_out = {}
     return out, error, structured_out
+  
+  def preexec_fn(self):
+    os.setpgid(0, 0)
 
   def launch_python_subprocess(self, command, tmpout, tmperr):
     """
@@ -181,7 +184,7 @@ class PythonExecutor(object):
 
     return subprocess.Popen(command,
       stdout=tmpout,
-      stderr=tmperr, close_fds=close_fds, env=command_env)
+      stderr=tmperr, close_fds=close_fds, env=command_env, preexec_fn=self.preexec_fn)
 
   def isSuccessfull(self, returncode):
     return not self.python_process_has_been_killed and returncode == 0


Mime
View raw message