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 2015/03/14 15:36:45 UTC

[2/2] ambari git commit: AMBARI-10072. Reinstalling clients on non-root fails (aonishuk)

AMBARI-10072. Reinstalling clients on non-root fails (aonishuk)


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

Branch: refs/heads/branch-2.0.0
Commit: bed741abb0036ba045531a4aced035dbb6cb068b
Parents: 33e181f
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Sat Mar 14 16:36:33 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Sat Mar 14 16:36:33 2015 +0200

----------------------------------------------------------------------
 ambari-agent/src/test/python/resource_management/TestScript.py   | 2 +-
 .../main/python/resource_management/libraries/script/script.py   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bed741ab/ambari-agent/src/test/python/resource_management/TestScript.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/resource_management/TestScript.py b/ambari-agent/src/test/python/resource_management/TestScript.py
index 8463e79..da9aa0e 100644
--- a/ambari-agent/src/test/python/resource_management/TestScript.py
+++ b/ambari-agent/src/test/python/resource_management/TestScript.py
@@ -130,7 +130,7 @@ class TestScript(TestCase):
       Script.config = good_config
       script.set_version()
     resource_dump = pprint.pformat(env.resource_list)
-    self.assertEquals(resource_dump, '[u"Execute[\'/usr/bin/hdp-select set kafka-broker 2.2.0.0-2041\']"]')
+    self.assertEquals(resource_dump, '[u"Execute[\'(\'/usr/bin/hdp-select\', \'set\', \'kafka-broker\', \'2.2.0.0-2041\')\']"]')
 
     # Component does not provide mapping
     get_stack_to_component_mock.return_value = {}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bed741ab/ambari-common/src/main/python/resource_management/libraries/script/script.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index 5af8706..1e35327 100644
--- a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -477,6 +477,6 @@ class Script(object):
       component_name = stack_to_component[stack_name] if stack_name in stack_to_component else None
       if component_name and stack_name and version and \
               compare_versions(format_hdp_stack_version(hdp_stack_version), '2.2.0.0') >= 0:
-        Execute("/usr/bin/hdp-select set {component_name} {version}".format(
-            component_name=component_name, version=version))
+        Execute(('/usr/bin/hdp-select', 'set', component_name, version),
+                sudo = True)