Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 0e4d2646e -> 5ca440bbe


AMBARI-15163. 'ambari-server start' is failed [import FatalException, 
NonFatalException] after upgrade from 2.1.2 ... 2.2.0.0 etc  to 2.2.1.1 
(aonishuk)


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

Branch: refs/heads/branch-2.2
Commit: 5ca440bbe10f03abb0da215c7a0403ed7e755885
Parents: 0e4d264
Author: Andrew Onishuk <aonis...@hortonworks.com>
Authored: Wed Feb 24 22:57:23 2016 +0200
Committer: Andrew Onishuk <aonis...@hortonworks.com>
Committed: Wed Feb 24 22:57:23 2016 +0200

----------------------------------------------------------------------
 ambari-server/conf/unix/install-helper.sh | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5ca440bb/ambari-server/conf/unix/install-helper.sh
----------------------------------------------------------------------
diff --git a/ambari-server/conf/unix/install-helper.sh 
b/ambari-server/conf/unix/install-helper.sh
index 53f6c5e..9d3c66f 100644
--- a/ambari-server/conf/unix/install-helper.sh
+++ b/ambari-server/conf/unix/install-helper.sh
@@ -27,6 +27,7 @@ COMMON_DIR_SERVER="/usr/lib/ambari-server/lib/ambari_commons"
 RESOURCE_MANAGEMENT_DIR_SERVER="/usr/lib/ambari-server/lib/resource_management"
 JINJA_SERVER_DIR="/usr/lib/ambari-server/lib/ambari_jinja2"
 SIMPLEJSON_SERVER_DIR="/usr/lib/ambari-server/lib/ambari_simplejson"
+AMBARI_ENV_RPMSAVE="/var/lib/ambari-server/ambari-env.sh.rpmsave" # this turns 
into ambari-env.sh during ambari-server start
 
 PYTHON_WRAPER_TARGET="/usr/bin/ambari-python-wrap"
 
@@ -69,6 +70,12 @@ do_install(){
   else
     ln -s "$AMBARI_PYTHON" "$PYTHON_WRAPER_TARGET"
   fi
+
+  PYTHON_PATH_LINE='export 
PYTHONPATH=$PYTHONPATH:/usr/lib/python2.6/site-packages'
+  grep "^$PYTHON_PATH_LINE\$" "$AMBARI_ENV_RPMSAVE" > /dev/null
+  if [ $? -ne 0 ]; then
+    echo -e "\n$PYTHON_PATH_LINE" >> $AMBARI_ENV_RPMSAVE
+  fi
 }
 
 do_remove(){

Reply via email to