You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rl...@apache.org on 2017/06/21 18:06:03 UTC

[07/13] ambari git commit: AMBARI-21287. Cannot install Datanode/AppTimeLine server from ambari 3.0 (dlysnichenko)

AMBARI-21287. Cannot install Datanode/AppTimeLine server from ambari 3.0 (dlysnichenko)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 4dac1b196e24c67243387c124f2c3109cbb3eee0
Parents: d693273
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Tue Jun 20 18:21:21 2017 +0300
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Tue Jun 20 18:21:21 2017 +0300

----------------------------------------------------------------------
 .../stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py    | 2 ++
 .../3.0/hooks/before-INSTALL/scripts/repo_initialization.py  | 8 ++++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4dac1b19/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py
index 6193c11..50c5a40 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/params.py
@@ -111,3 +111,5 @@ if has_hbase_masters:
 #repo params
 repo_info = config['hostLevelParams']['repo_info']
 service_repo_info = default("/hostLevelParams/service_repo_info",None)
+
+repo_file = default("/repositoryFile", None)

http://git-wip-us.apache.org/repos/asf/ambari/blob/4dac1b19/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py
index a35dce7..357bc62 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-INSTALL/scripts/repo_initialization.py
@@ -19,6 +19,7 @@ limitations under the License.
 
 from ambari_commons.os_check import OSCheck
 from resource_management.libraries.resources.repository import Repository
+from resource_management.libraries.functions.repository_util import create_repo_files, CommandRepository
 from resource_management.core.logger import Logger
 import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
 
@@ -63,6 +64,13 @@ def install_repos():
     return
 
   template = params.repo_rhel_suse if OSCheck.is_suse_family() or OSCheck.is_redhat_family() else params.repo_ubuntu
+
+  # use this newer way of specifying repositories, if available
+  if params.repo_file is not None:
+    create_repo_files(template, CommandRepository(params.repo_file))
+    return
+
   _alter_repo("create", params.repo_info, template)
+
   if params.service_repo_info:
     _alter_repo("create", params.service_repo_info, template)