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 2017/09/20 08:19:38 UTC

[2/2] ambari git commit: AMBARI-22003. Ambari schema upgrade failure as views destination path dir already exists (aonishuk)

AMBARI-22003. Ambari schema upgrade failure as views destination path dir already exists (aonishuk)


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

Branch: refs/heads/branch-2.6
Commit: f64d027dbab94a93dc434b5698afef9b83c71e30
Parents: c7b9348
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed Sep 20 11:19:14 2017 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Sep 20 11:19:14 2017 +0300

----------------------------------------------------------------------
 ambari-server/src/main/python/ambari_server/serverUpgrade.py | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f64d027d/ambari-server/src/main/python/ambari_server/serverUpgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverUpgrade.py b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
index a10841d..421adfc 100644
--- a/ambari-server/src/main/python/ambari_server/serverUpgrade.py
+++ b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
@@ -267,6 +267,10 @@ def upgrade(args):
   # Move files installed by package to default views directory to a custom one
   for views_dir in get_views_dir(properties):
     root_views_dir = views_dir + "/../"
+
+    if os.path.samefile(root_views_dir, get_default_views_dir()):
+      continue
+
     for file in glob.glob(get_default_views_dir()+'/*'):
       shutil.move(file, root_views_dir)