Browse Source

AMBARI-6171. Ambari server is not starting after upgrade. (Iryna Kuzmenko via swagle)

Siddharth Wagle 11 years ago
parent
commit
d82625e4e5

+ 4 - 0
ambari-agent/pom.xml

@@ -198,6 +198,10 @@
             <scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
             <fileEncoding>utf-8</fileEncoding>
           </preremoveScriptlet>
+          <posttransScriptlet>
+            <scriptFile>src/main/package/rpm/posttrans.sh</scriptFile>
+            <fileEncoding>utf-8</fileEncoding>
+          </posttransScriptlet>
 
           <needarch>x86_64</needarch>
           <autoRequires>false</autoRequires>

+ 19 - 0
ambari-agent/src/main/package/rpm/posttrans.sh

@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
+
+COMMON_DIR="/usr/lib/python2.6/site-packages/common_functions"
+COMMON_DIR_SERVER="/usr/lib/ambari-server/lib/common_functions"
+
+ln -s "$COMMON_DIR_SERVER" "$COMMON_DIR"

+ 0 - 1
ambari-server/conf/unix/install-helper.sh

@@ -27,7 +27,6 @@ PYTHON_WRAPER_SOURCE="/var/lib/ambari-server/ambari-python-wrap"
 do_install(){
   # setting common_functions shared resource
   rm -rf "$COMMON_DIR"
-  ln -s "$COMMON_DIR_SERVER" "$COMMON_DIR"
   # setting python-wrapper script
   if [ ! -f "$PYTHON_WRAPER_TARGET" ]; then
     ln -s "$PYTHON_WRAPER_SOURCE" "$PYTHON_WRAPER_TARGET"

+ 4 - 0
ambari-server/pom.xml

@@ -221,6 +221,10 @@
             <scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
             <fileEncoding>utf-8</fileEncoding>
           </preremoveScriptlet>
+          <posttransScriptlet>
+            <scriptFile>src/main/package/rpm/posttrans.sh</scriptFile>
+            <fileEncoding>utf-8</fileEncoding>
+          </posttransScriptlet>
           <defaultFilemode>644</defaultFilemode>
           <defaultDirmode>755</defaultDirmode>
           <defaultUsername>root</defaultUsername>

+ 19 - 0
ambari-server/src/main/package/rpm/posttrans.sh

@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
+
+COMMON_DIR="/usr/lib/python2.6/site-packages/common_functions"
+COMMON_DIR_SERVER="/usr/lib/ambari-server/lib/common_functions"
+
+ln -s "$COMMON_DIR_SERVER" "$COMMON_DIR"