You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2016/02/09 16:40:22 UTC
[1/2] ambari git commit: AMBARI-14973. ambari-agent upstart script
restart triggers the restart of hbase specific JVM processes (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/branch-2.2 9e425d774 -> 43e9da158
refs/heads/trunk 429450010 -> ef1b98b3c
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/trunk
Commit: ef1b98b3c77a5b4ebafbd5cc9c720ad9f13b63e8
Parents: 4294500
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Feb 9 17:40:11 2016 +0200
Committer: Andrew Onishuk <ao...@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
[2/2] ambari git commit: AMBARI-14973. ambari-agent upstart script
restart triggers the restart of hbase specific JVM processes (aonishuk)
Posted by ao...@apache.org.
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 <ao...@hortonworks.com>
Authored: Tue Feb 9 17:40:15 2016 +0200
Committer: Andrew Onishuk <ao...@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