ソースを参照

AMBARI-9312. AMS status should be Critical if ams-hbase process goes down. Start fix. (mpapirkovskyy)

Myroslav Papirkovskyy 10 年 前
コミット
2adcc744b9

+ 1 - 1
ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector

@@ -218,7 +218,7 @@ case "$1" in
     daemon_status "${PIDFILE}"
     if [[ $? == 0  ]]; then
         echo "AMS is running as process $(cat "${PIDFILE}"). Exiting"
-        exit 1
+        exit 0
     else
         # stale pid file, so just remove it and continue on
         rm -f "${PIDFILE}" >/dev/null 2>&1

+ 3 - 2
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/ams_service.py

@@ -38,7 +38,9 @@ def ams_service(name, action):
   if name == 'collector':
     cmd = format("{ams_collector_script} --config {ams_collector_conf_dir}")
     pid_file = format("{ams_collector_pid_dir}/ambari-metrics-collector.pid")
-    no_op_test = format("ls {pid_file} >/dev/null 2>&1 && ps `cat {pid_file}` >/dev/null 2>&1")
+    #no_op_test should be much more complex to work with cumulative status of collector
+    #removing as startup script handle it also
+    #no_op_test = format("ls {pid_file} >/dev/null 2>&1 && ps `cat {pid_file}` >/dev/null 2>&1")
 
     if params.is_hbase_distributed:
       hbase_service('zookeeper', action=action)
@@ -49,7 +51,6 @@ def ams_service(name, action):
     if action == 'start':
       daemon_cmd = format("{cmd} start")
       Execute(daemon_cmd,
-              not_if=no_op_test,
               user=params.ams_user
       )