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/db36bd92
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/db36bd92
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/db36bd92

Branch: refs/heads/branch-dev-patch-upgrade
Commit: db36bd92f6cf7d648d0a748cb9164185d12ee329
Parents: 325dc20
Author: Lisnichenko Dmitro <[email protected]>
Authored: Thu Feb 2 11:32:04 2017 +0200
Committer: Lisnichenko Dmitro <[email protected]>
Committed: Thu Feb 2 11:32:04 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/db36bd92/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:"

Reply via email to