This is an automated email from the ASF dual-hosted git repository. dsen pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push: new c4c3149 [AMBARI-23834] Rebalance HDFS fails (dsen) (#1312) c4c3149 is described below commit c4c31492ecd78316d7e8fb372eef41ca4d3fbb87 Author: Dmitry Sen <d...@apache.org> AuthorDate: Fri May 18 12:59:59 2018 +0300 [AMBARI-23834] Rebalance HDFS fails (dsen) (#1312) --- .../src/main/python/resource_management/core/shell.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ambari-common/src/main/python/resource_management/core/shell.py b/ambari-common/src/main/python/resource_management/core/shell.py index e0c71f8..d815732 100644 --- a/ambari-common/src/main/python/resource_management/core/shell.py +++ b/ambari-common/src/main/python/resource_management/core/shell.py @@ -115,7 +115,7 @@ def call(command, quiet=False, logoutput=None, stdout=subprocess32.PIPE,stderr=s tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns) @log_function_call -def non_blocking_call(command, quiet=False, stdout=subprocess32.PIPE,stderr=subprocess32.STDOUT, +def non_blocking_call(command, quiet=False, stdout=None, stderr=None, cwd=None, env=None, preexec_fn=preexec_fn, user=None, timeout=None, path=None, sudo=False): """ Execute the shell command and don't wait until it's completion @@ -212,7 +212,13 @@ def _call(command, logoutput=None, throw_on_failure=True, stdout=subprocess32.PI # --noprofile is used to preserve PATH set for ambari-agent subprocess32_command = ["/bin/bash","--login","--noprofile","-c", command] - + + # don't create stdout and stderr pipes, because forked process will not be able to use them if current process dies + # creating pipes may lead to the forked process silent crash + if not wait_for_finish: + stdout = None + stderr = None + files_to_close = [] if isinstance(stdout, basestring): stdout = open(stdout, 'wb') -- To stop receiving notification emails like this one, please contact d...@apache.org.