You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/01/19 18:01:48 UTC

ambari git commit: AMBARI-9198. Failing on host re-register (aonishuk)

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 <ao...@hortonworks.com>
Authored: Mon Jan 19 19:01:39 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
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")