Repository: ambari Updated Branches: refs/heads/branch-2.2 4c73a51dc -> 70c7432b8
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/70c7432b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/70c7432b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/70c7432b Branch: refs/heads/branch-2.2 Commit: 70c7432b873f147f8c8ea7c905f12f3d59db4404 Parents: 4c73a51 Author: Andrew Onishuk <[email protected]> Authored: Wed Feb 17 19:53:23 2016 +0200 Committer: Andrew Onishuk <[email protected]> Committed: Wed Feb 17 19:53:23 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/70c7432b/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/70c7432b/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 3fa29a6..266be42 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 @@ -104,7 +104,7 @@ 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/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py prepare_rolling_upgrade /tmp", logoutput=True, quiet=True) + call_mock.assert_called_with("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/scripts/namenode.py prepare_rolling_upgrade /tmp", logoutput=True, quiet=True) @patch("resource_management.core.shell.checked_call") @patch("os.path.exists") @@ -149,4 +149,4 @@ 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/scripts/namenode.py prepare_rolling_upgrade /tmp", logoutput=True, quiet=True) + 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/scripts/namenode.py prepare_rolling_upgrade /tmp", logoutput=True, quiet=True)
