Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BB58D200CAE for ; Wed, 21 Jun 2017 20:06:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B9725160BFE; Wed, 21 Jun 2017 18:06:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 14C8A160BF6 for ; Wed, 21 Jun 2017 20:05:59 +0200 (CEST) Received: (qmail 74810 invoked by uid 500); 21 Jun 2017 18:05:59 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 74627 invoked by uid 99); 21 Jun 2017 18:05:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2017 18:05:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0DBAAE109B; Wed, 21 Jun 2017 18:05:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rlevas@apache.org To: commits@ambari.apache.org Date: Wed, 21 Jun 2017 18:06:03 -0000 Message-Id: <63d1ba1a6c204b589fa2ac5f665fb0fc@git.apache.org> In-Reply-To: <28ed6b648a9a46e5bc82d5e02638d66d@git.apache.org> References: <28ed6b648a9a46e5bc82d5e02638d66d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [07/13] ambari git commit: AMBARI-21287. Cannot install Datanode/AppTimeLine server from ambari 3.0 (dlysnichenko) archived-at: Wed, 21 Jun 2017 18:06:00 -0000 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 Authored: Tue Jun 20 18:21:21 2017 +0300 Committer: Lisnichenko Dmitro 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)