Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-14714 986b3b1fc -> 530df165d
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/c8832728 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c8832728 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c8832728 Branch: refs/heads/branch-feature-AMBARI-14714 Commit: c8832728ad0ebb545bd8795de23d0b859af23d1a Parents: a90f3b3 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Wed Sep 20 11:19:09 2017 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Wed Sep 20 11:19:09 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/c8832728/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 8712da5..b0e0128 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)