You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/02/18 14:33:37 UTC
[18/33] ambari git commit: AMBARI-15072. Failures in Express Upgrade
from Dal M20 to Derg due to missing modules (aonishuk)
AMBARI-15072. Failures in Express Upgrade from Dal M20 to Derg due to missing modules (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d4b67b1f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d4b67b1f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d4b67b1f
Branch: refs/heads/branch-dev-patch-upgrade
Commit: d4b67b1fd39fdbdc05c8f0d9449d0c0156befa6c
Parents: 7d06e8b
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed Feb 17 19:58:17 2016 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Feb 17 19:58:17 2016 +0200
----------------------------------------------------------------------
.../main/resources/custom_actions/scripts/ru_execute_tasks.py | 2 +-
.../src/test/python/custom_actions/test_ru_execute_tasks.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/d4b67b1f/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py b/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py
index 928fef8..8e526c5 100644
--- a/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py
+++ b/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py
@@ -144,7 +144,7 @@ class ExecuteUpgradeTasks(Script):
self.logging_level,
Script.get_tmp_dir()]
- task.command = " ".join(command_params)
+ task.command = "source /var/lib/ambari-agent/ambari-env.sh ; " + " ".join(command_params)
# Replace redundant whitespace to make the unit tests easier to validate
task.command = re.sub("\s+", " ", task.command).strip()
http://git-wip-us.apache.org/repos/asf/ambari/blob/d4b67b1f/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py b/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
index 31c1030..6147b87 100644
--- a/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
+++ b/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
@@ -129,7 +129,7 @@ class TestRUExecuteTasks(RMFTestCase):
ru_execute.actionexecute(None)
call_mock.assert_called_with(
- "/usr/bin/ambari-python-wrap /var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package" + os.sep +
+ "source /var/lib/ambari-agent/ambari-env.sh ; /usr/bin/ambari-python-wrap /var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package" + os.sep +
"scripts/namenode.py prepare_rolling_upgrade /tmp", logoutput=True, quiet=True)
pass
@@ -176,6 +176,6 @@ class TestRUExecuteTasks(RMFTestCase):
ru_execute = ExecuteUpgradeTasks()
ru_execute.actionexecute(None)
- call_mock.assert_called_with("/usr/bin/ambari-python-wrap /var/lib/ambari-agent/cache/custom_actions" + os.sep +
+ call_mock.assert_called_with("source /var/lib/ambari-agent/ambari-env.sh ; /usr/bin/ambari-python-wrap /var/lib/ambari-agent/cache/custom_actions" + os.sep +
"scripts/namenode.py prepare_rolling_upgrade /tmp", logoutput=True, quiet=True)
pass