ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [1/2] ambari git commit: AMBARI-18285. Ambari upgrade from 2.4.0.x version fails. (aonishuk)
Date Wed, 31 Aug 2016 11:12:30 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 740d38655 -> a989f7016
  refs/heads/trunk f45e9054d -> a6558f869


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/a6558f86
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a6558f86
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a6558f86

Branch: refs/heads/trunk
Commit: a6558f869d1a60a09d9729b39795e44f85e0cb09
Parents: f45e905
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Wed Aug 31 14:12:13 2016 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Wed Aug 31 14:12:13 2016 +0300

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/a6558f86/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 c5b2641..09e66a5 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