You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2017/02/02 09:33:00 UTC

[2/2] ambari git commit: AMBARI-19818. "Set version on all hosts" failed during EU (dlysnichenko)

AMBARI-19818. "Set version on all hosts" failed during EU (dlysnichenko)


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

Branch: refs/heads/branch-2.5
Commit: 877ab571b9c900e71860051cd7d520ce6e69b3fc
Parents: 7e11d79
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Thu Feb 2 11:32:04 2017 +0200
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Thu Feb 2 11:32:43 2017 +0200

----------------------------------------------------------------------
 ambari-agent/conf/unix/agent-multiplier.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/877ab571/ambari-agent/conf/unix/agent-multiplier.py
----------------------------------------------------------------------
diff --git a/ambari-agent/conf/unix/agent-multiplier.py b/ambari-agent/conf/unix/agent-multiplier.py
index 5abae58..63409dd 100644
--- a/ambari-agent/conf/unix/agent-multiplier.py
+++ b/ambari-agent/conf/unix/agent-multiplier.py
@@ -320,19 +320,22 @@ class Multiplier:
     print "Starting %d host(s)" % len(self.hosts)
     for host in self.hosts:
       cmd = "ambari-agent start --home %s" % (host.home_dir)
-      subprocess.call(cmd, shell=True)
+      os.environ['AMBARI_AGENT_CONF_DIR'] = os.path.join(host.home_dir, "etc/ambari-agent/conf")
+      subprocess.call(cmd, shell=True, env=os.environ)
 
   def cmd_stop(self):
     print "Stopping %d host(s)" % len(self.hosts)
     for host in self.hosts:
       cmd = "ambari-agent stop --home %s" % (host.home_dir)
-      subprocess.call(cmd, shell=True)
+      os.environ['AMBARI_AGENT_CONF_DIR'] = os.path.join(host.home_dir, "etc/ambari-agent/conf")
+      subprocess.call(cmd, shell=True, env=os.environ)
 
   def cmd_restart(self):
     print "Restarting %d host(s)" % len(self.hosts)
     for host in self.hosts:
       cmd = "ambari-agent restart --home %s" % (host.home_dir)
-      subprocess.call(cmd, shell=True)
+      os.environ['AMBARI_AGENT_CONF_DIR'] = os.path.join(host.home_dir, "etc/ambari-agent/conf")
+      subprocess.call(cmd, shell=True, env=os.environ)
 
   def cmd_status(self):
     print "Summary of Agent Status:"