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 0C06F17B29 for ; Mon, 19 Jan 2015 17:01:46 +0000 (UTC) Received: (qmail 35746 invoked by uid 500); 19 Jan 2015 17:01:48 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 35716 invoked by uid 500); 19 Jan 2015 17:01:48 -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 35707 invoked by uid 99); 19 Jan 2015 17:01:48 -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; Mon, 19 Jan 2015 17:01:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 049C0E0383; Mon, 19 Jan 2015 17:01:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aonishuk@apache.org To: commits@ambari.apache.org Message-Id: <9d6a8058ed24431b8a9000dc160d271c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-9198. Failing on host re-register (aonishuk) Date: Mon, 19 Jan 2015 17:01:48 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk 7621f9013 -> 20250f473 AMBARI-9198. Failing on host re-register (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/20250f47 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/20250f47 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/20250f47 Branch: refs/heads/trunk Commit: 20250f473e30f5c4989291e0033f99ed3f1f4bdd Parents: 7621f90 Author: Andrew Onishuk Authored: Mon Jan 19 19:01:39 2015 +0200 Committer: Andrew Onishuk Committed: Mon Jan 19 19:01:39 2015 +0200 ---------------------------------------------------------------------- ambari-server/src/main/python/bootstrap.py | 2 +- ambari-server/src/test/python/TestBootstrap.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/20250f47/ambari-server/src/main/python/bootstrap.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/python/bootstrap.py b/ambari-server/src/main/python/bootstrap.py index e27f399..8ac6a37 100755 --- a/ambari-server/src/main/python/bootstrap.py +++ b/ambari-server/src/main/python/bootstrap.py @@ -243,7 +243,7 @@ class Bootstrap(threading.Thread): params = self.shared_state user = params.user - command = "[ -d {0} ] || sudo mkdir -p {0} ; sudo chown {1} {0}".format(self.TEMP_FOLDER,params.user) + command = "sudo mkdir -p {0} ; sudo chown -R {1} {0}".format(self.TEMP_FOLDER,params.user) ssh = SSH(params.user, params.sshkey_file, self.host, command, params.bootdir, self.host_log) http://git-wip-us.apache.org/repos/asf/ambari/blob/20250f47/ambari-server/src/test/python/TestBootstrap.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/TestBootstrap.py b/ambari-server/src/test/python/TestBootstrap.py index 0720d8a..373a4be 100644 --- a/ambari-server/src/test/python/TestBootstrap.py +++ b/ambari-server/src/test/python/TestBootstrap.py @@ -360,8 +360,8 @@ class TestBootstrap(TestCase): self.assertEquals(res, expected) command = str(init_mock.call_args[0][3]) self.assertEqual(command, - "[ -d /var/lib/ambari-agent/data/tmp ] || sudo mkdir -p /var/lib/ambari-agent/data/tmp ; " - "sudo chown root /var/lib/ambari-agent/data/tmp") + "sudo mkdir -p /var/lib/ambari-agent/data/tmp ; " + "sudo chown -R root /var/lib/ambari-agent/data/tmp") @patch.object(Bootstrap, "getOsCheckScript") @patch.object(Bootstrap, "getOsCheckScriptRemoteLocation")