ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-18285. Ambari upgrade from 2.4.0.x version fails. (aonishuk)
Date Thu, 01 Sep 2016 09:25:16 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 e3d2ce94e -> 0b3b6c3df


AMBARI-18285. Ambari upgrade from 2.4.0.x version fails. (aonishuk)


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

Branch: refs/heads/branch-2.5
Commit: 0b3b6c3df8bfbf1f5c59edf2b58dacce6e98dd51
Parents: e3d2ce9
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Thu Sep 1 12:24:45 2016 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Thu Sep 1 12:24:45 2016 +0300

----------------------------------------------------------------------
 .../src/main/package/rpm/preinstall.sh          | 27 ++++++++++++++++++++
 1 file changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0b3b6c3d/ambari-server/src/main/package/rpm/preinstall.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/package/rpm/preinstall.sh b/ambari-server/src/main/package/rpm/preinstall.sh
index 6ed7444..28878bb 100644
--- a/ambari-server/src/main/package/rpm/preinstall.sh
+++ b/ambari-server/src/main/package/rpm/preinstall.sh
@@ -21,6 +21,15 @@ STACKS_FOLDER_OLD="${ROOT}/var/lib/ambari-server/resources/stacks_$(date
'+%d_%m
 COMMON_SERVICES_FOLDER=${ROOT}"/var/lib/ambari-server/resources/common-services"
 COMMON_SERVICES_FOLDER_OLD="${ROOT}/var/lib/ambari-server/resources/common-services_$(date
'+%d_%m_%y_%H_%M').old"
 
+AMBARI_PROPERTIES="${ROOT}/etc/ambari-server/conf/ambari.properties"
+AMBARI_PROPERTIES_OLD="$AMBARI_PROPERTIES.rpmsave"
+
+AMBARI_ENV="${ROOT}/var/lib/ambari-server/ambari-env.sh"
+AMBARI_ENV_OLD="$AMBARI_ENV.rpmsave"
+
+AMBARI_KRB_JAAS_LOGIN_FILE="${ROOT}/etc/ambari-server/conf/krb5JAASLogin.conf"
+AMBARI_KRB_JAAS_LOGIN_FILE_OLD="$AMBARI_KRB_JAAS_LOGIN_FILE.rpmsave"
+
 AMBARI_VIEWS_FOLDER="${ROOT}/var/lib/ambari-server/resources/views"
 AMBARI_VIEWS_BACKUP_FOLDER="$AMBARI_VIEWS_FOLDER/backups"
 
@@ -34,6 +43,24 @@ then
     mv "$SERVER_CONF_SAVE" "$SERVER_CONF_SAVE_BACKUP"
 fi
 
+# Creating rpmsave files is done automatically by rpm, however on minor version upgrade (e.g.
2.4.0 -> 2.4.0.1) has to be done manually.
+if [ -f "$AMBARI_PROPERTIES" ]
+then
+    mv -f "$AMBARI_PROPERTIES" "$AMBARI_PROPERTIES_OLD"
+fi
+
+# Creating rpmsave files is done automatically by rpm, however on minor version upgrade (e.g.
2.4.0 -> 2.4.0.1) has to be done manually.
+if [ -f "$AMBARI_ENV" ]
+then
+    mv -f "$AMBARI_ENV" "$AMBARI_ENV_OLD"
+fi
+
+# Creating rpmsave files is done automatically by rpm, however on minor version upgrade (e.g.
2.4.0 -> 2.4.0.1) has to be done manually.
+if [ -f "$AMBARI_KRB_JAAS_LOGIN_FILE" ]
+then
+    mv -f "$AMBARI_KRB_JAAS_LOGIN_FILE" "$AMBARI_KRB_JAAS_LOGIN_FILE_OLD"
+fi
+
 if [ -d "$STACKS_FOLDER" ]
 then
     mv -f "$STACKS_FOLDER" "$STACKS_FOLDER_OLD"


Mime
View raw message