You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2013/05/21 01:15:21 UTC

svn commit: r1484622 - in /incubator/ambari/trunk: CHANGES.txt ambari-agent/src/main/package/rpm/preinstall.sh ambari-agent/src/main/package/rpm/preremove.sh ambari-server/src/main/package/rpm/preinstall.sh ambari-server/src/main/package/rpm/preremove.sh

Author: smohanty
Date: Mon May 20 23:15:20 2013
New Revision: 1484622

URL: http://svn.apache.org/r1484622
Log:
AMBARI-2165. Ambari server upgrade fails when upgrading second time. (smohanty)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preinstall.sh
    incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preremove.sh
    incubator/ambari/trunk/ambari-server/src/main/package/rpm/preinstall.sh
    incubator/ambari/trunk/ambari-server/src/main/package/rpm/preremove.sh

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1484622&r1=1484621&r2=1484622&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Mon May 20 23:15:20 2013
@@ -870,6 +870,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2165. Ambari server upgrade fails when upgrading
+ second time. (smohanty)
+
  AMBARI-2166. Stack versions should be marked as active. (srimanth)
 
  AMBARI-2164. START_FAILED and STOP_FAILED no longer exist, the upgrade 

Modified: incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preinstall.sh
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preinstall.sh?rev=1484622&r1=1484621&r2=1484622&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preinstall.sh (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preinstall.sh Mon May 20 23:15:20 2013
@@ -13,6 +13,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License
 
+if [ -d "/etc/ambari-agent/conf.save" ]
+then
+    mv /etc/ambari-agent/conf.save /etc/ambari-agent/conf_$(date '+%d_%m_%y_%H_%M').save
+fi
+
 getent group puppet >/dev/null || groupadd -r puppet
 getent passwd puppet >/dev/null || /usr/sbin/useradd -g puppet puppet
 

Modified: incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preremove.sh
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preremove.sh?rev=1484622&r1=1484621&r2=1484622&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preremove.sh (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preremove.sh Mon May 20 23:15:20 2013
@@ -19,6 +19,10 @@
 
 if [ "$1" -eq 0 ]; # Action is uninstall
 then
+    if [ -d "/etc/ambari-agent/conf.save" ]
+    then
+        mv /etc/ambari-agent/conf.save /etc/ambari-agent/conf_$(date '+%d_%m_%y_%H_%M').save
+    fi
     mv /etc/ambari-agent/conf /etc/ambari-agent/conf.save
 fi
 

Modified: incubator/ambari/trunk/ambari-server/src/main/package/rpm/preinstall.sh
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/package/rpm/preinstall.sh?rev=1484622&r1=1484621&r2=1484622&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/package/rpm/preinstall.sh (original)
+++ incubator/ambari/trunk/ambari-server/src/main/package/rpm/preinstall.sh Mon May 20 23:15:20 2013
@@ -13,4 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License
 
+if [ -d "/etc/ambari-server/conf.save" ]
+then
+    mv /etc/ambari-server/conf.save /etc/ambari-server/conf_$(date '+%d_%m_%y_%H_%M').save
+fi
+
 exit 0
\ No newline at end of file

Modified: incubator/ambari/trunk/ambari-server/src/main/package/rpm/preremove.sh
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/package/rpm/preremove.sh?rev=1484622&r1=1484621&r2=1484622&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/package/rpm/preremove.sh (original)
+++ incubator/ambari/trunk/ambari-server/src/main/package/rpm/preremove.sh Mon May 20 23:15:20 2013
@@ -19,6 +19,10 @@
 
 if [ "$1" -eq 0 ]; # Action is uninstall
 then
+    if [ -d "/etc/ambari-server/conf.save" ]
+    then
+        mv /etc/ambari-server/conf.save /etc/ambari-server/conf_$(date '+%d_%m_%y_%H_%M').save
+    fi
     mv /etc/ambari-server/conf /etc/ambari-server/conf.save
 fi