소스 검색

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

Artem Baranchuk 10 년 전
부모
커밋
692c3a8c4c
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 1
      ambari-server/sbin/ambari-server
  2. 1 1
      ambari-server/src/main/python/ambari-server.py

+ 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()