ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbrodets...@apache.org
Subject ambari git commit: AMBARI-15483. Strange paths in ambari-server setup.(vbrodetskyi)
Date Mon, 21 Mar 2016 10:33:53 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 5d52b70dd -> 76fd6809d


AMBARI-15483. Strange paths in ambari-server setup.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 76fd6809d9d8d8483412f89734a83d19b36840ca
Parents: 5d52b70
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Mon Mar 21 09:46:48 2016 +0200
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Mon Mar 21 09:46:48 2016 +0200

----------------------------------------------------------------------
 .../src/main/python/ambari_server/serverConfiguration.py     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/76fd6809/ambari-server/src/main/python/ambari_server/serverConfiguration.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
index 29187bd..a5e7bee 100644
--- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
@@ -226,10 +226,12 @@ def get_ambari_properties():
     properties = Properties()
     with open(conf_file) as hfR:
       properties.load(hfR)
-      
+
+    root = os.environ["ROOT"].rstrip("/")
+
     for k,v in properties.iteritems():
-      properties.__dict__[k] = v.replace("$ROOT", os.environ["ROOT"])
-      properties._props[k] = v.replace("$ROOT", os.environ["ROOT"])
+      properties.__dict__[k] = v.replace("$ROOT", root)
+      properties._props[k] = v.replace("$ROOT", root)
   except (Exception), e:
     print 'Could not read "%s": %s' % (conf_file, e)
     return -1


Mime
View raw message