ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [2/2] ambari git commit: AMBARI-14973. ambari-agent upstart script restart triggers the restart of hbase specific JVM processes (aonishuk)
Date Tue, 09 Feb 2016 15:40:23 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/43e9da15
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/43e9da15
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/43e9da15

Branch: refs/heads/branch-2.2
Commit: 43e9da158cdba8c996592dada80615e848380ea8
Parents: 9e425d7
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Tue Feb 9 17:40:15 2016 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Tue Feb 9 17:40:15 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/43e9da15/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 350c568..cc08127 100644
--- a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
+++ b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
@@ -150,6 +150,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):
     """
@@ -165,7 +168,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