Browse Source

AMBARI-11599 - /usr/bin/ambari-server.py always returns RC 0

Artem Baranchuk 10 năm trước cách đây
mục cha
commit
692c3a8c4c

+ 2 - 1
ambari-server/sbin/ambari-server

@@ -77,6 +77,7 @@ if (( $numversion < 26 )); then
 fi
 echo "Using python " $PYTHON
 
+ret=0
 case "$1" in
   start)
         echo -e "Starting ambari-server"
@@ -151,4 +152,4 @@ case "$1" in
         exit 1
 esac
 
-exit 0
+exit $?

+ 1 - 1
ambari-server/src/main/python/ambari-server.py

@@ -224,7 +224,7 @@ def setup_security(args):
   try:
     actionDesc = actions[int(choice) - 1]
   except IndexError:
-    raise FatalException('Unknown option for setup-security command.')
+    raise FatalException(1, 'Unknown option for setup-security command.')
 
   action = actionDesc[1]
   action.execute()