Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 414BD18228 for ; Tue, 26 Jan 2016 21:45:11 +0000 (UTC) Received: (qmail 60974 invoked by uid 500); 26 Jan 2016 21:45:05 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 60784 invoked by uid 500); 26 Jan 2016 21:45:05 -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 59826 invoked by uid 99); 26 Jan 2016 21:45:05 -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; Tue, 26 Jan 2016 21:45:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B084BE0A57; Tue, 26 Jan 2016 21:45:04 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ncole@apache.org To: commits@ambari.apache.org Date: Tue, 26 Jan 2016 21:45:22 -0000 Message-Id: In-Reply-To: <8ba71937e62d427d95e867ff1fdeaf74@git.apache.org> References: <8ba71937e62d427d95e867ff1fdeaf74@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [19/50] ambari git commit: AMBARI-14752. hawq_profile script conflicts with HAWQ segment init(Lav Jain via odiachenko). AMBARI-14752. hawq_profile script conflicts with HAWQ segment init(Lav Jain via odiachenko). Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c305bc9f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c305bc9f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c305bc9f Branch: refs/heads/branch-dev-patch-upgrade Commit: c305bc9f30ec07a46cd492e44bb9f1247441404f Parents: c4f643a Author: Oleksandr Diachenko Authored: Fri Jan 22 14:04:19 2016 -0800 Committer: Oleksandr Diachenko Committed: Fri Jan 22 14:04:19 2016 -0800 ---------------------------------------------------------------------- .../HAWQ/2.0.0/package/scripts/common.py | 11 -------- .../2.0.0/package/scripts/hawq_constants.py | 1 - .../HAWQ/2.0.0/package/scripts/hawqsegment.py | 1 - .../HAWQ/2.0.0/package/scripts/master_helper.py | 10 -------- .../2.0.0/package/templates/hawq-profile.sh.j2 | 27 -------------------- 5 files changed, 50 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/c305bc9f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index daab7eb..23342f5 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -33,17 +33,6 @@ import utils import hawq_constants -def update_bashrc(source_file, target_file): - """ - Updates the hawq_user's .bashrc file with HAWQ env variables like - MASTER_DATA_DIRECTORY, PGHOST, PGPORT and PGUSER. - And sources the greenplum_path file. - """ - append_src_cmd = "echo 'source {0}' >> {1}".format(source_file, target_file) - src_cmd_exists = "grep 'source {0}' {1}".format(source_file, target_file) - Execute(append_src_cmd, user=hawq_constants.hawq_user, timeout=hawq_constants.default_exec_timeout, not_if=src_cmd_exists) - - def setup_user(): """ Creates HAWQ user home directory and sets up the correct ownership. http://git-wip-us.apache.org/repos/asf/ambari/blob/c305bc9f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py index 79efcc3..01de99a 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py @@ -45,7 +45,6 @@ sysctl_conf_dir = "/etc/sysctl.d" # Files hawq_slaves_file = os.path.join(hawq_config_dir, "slaves") -hawq_user_bashrc_file = os.path.join(hawq_user_home_dir, ".bashrc") hawq_greenplum_path_file = os.path.join(hawq_home_dir, "greenplum_path.sh") hawq_hosts_file = "/tmp/hawq_hosts" hawq_check_file = os.path.join(hawq_config_dir, "gpcheck.cnf") http://git-wip-us.apache.org/repos/asf/ambari/blob/c305bc9f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py index 37a118c..6bc9802 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py @@ -42,7 +42,6 @@ class HawqSegment(Script): env.set_params(hawq_constants) common.setup_user() common.setup_common_configurations() - common.update_bashrc(hawq_constants.hawq_greenplum_path_file, hawq_constants.hawq_user_bashrc_file) def __start_segment(self): http://git-wip-us.apache.org/repos/asf/ambari/blob/c305bc9f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py index a685db4..2e0b6da 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py @@ -54,15 +54,6 @@ def __setup_passwordless_ssh(): File(hawq_constants.hawq_hosts_file, action='delete') -def __setup_hawq_user_profile(): - """ - Sets up the ENV variables for hawq_user as a convenience for the command line users - """ - hawq_profile_file = os.path.join(os.path.expanduser("~{0}".format(hawq_constants.hawq_user)), ".hawq-profile.sh") - File(hawq_profile_file, content=Template("hawq-profile.sh.j2"), owner=hawq_constants.hawq_user, group=hawq_constants.hawq_group) - common.update_bashrc(hawq_profile_file, hawq_constants.hawq_user_bashrc_file) - - def configure_master(): """ Configures the master node after rpm install @@ -70,7 +61,6 @@ def configure_master(): common.setup_user() common.setup_common_configurations() __setup_master_specific_conf_files() - __setup_hawq_user_profile() __create_local_dirs() http://git-wip-us.apache.org/repos/asf/ambari/blob/c305bc9f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/templates/hawq-profile.sh.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/templates/hawq-profile.sh.j2 b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/templates/hawq-profile.sh.j2 deleted file mode 100644 index 625a9f5..0000000 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/templates/hawq-profile.sh.j2 +++ /dev/null @@ -1,27 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -###################################### -##### HAWQ env ####################### -###################################### -source {{hawq_greenplum_path_file}} -export MASTER_DATA_DIRECTORY={{hawq_master_dir}} -export PGPORT={{hawq_master_address_port}} -export PGHOST={{hawqmaster_host}} -export PGUSER={{hawq_user}}