Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ambari_trigger_service_checks.py bug

avatar

we are using the script - ambari_trigger_service_checks.py

in order to check the service check

but script print INFO FAIL on zookeeper in spite from ambari GUI zookeeper servoce check completely successfully - why?

from ambari GUI service check on zookeeper is working fine

62658-capture.png

 ./ambari_trigger_service_checks.py  -u admin -p admin -C hdp --services=ZOOKEEPER --wait --timeout=500
2018-03-05 15:24:13,428 - utils.py[log_option:2203](61993) - INFO  - timeout:  500
2018-03-05 15:24:13,428 - cli.py[main:159](61993) - INFO  - Hari Sekhon ambari_trigger_service_checks.py version 0.2 =>  CLI version 0.9.1 =>  Utils version 0.11.2
2018-03-05 15:24:13,428 - cli.py[main:160](61993) - INFO  - https://github.com/harisekhon/pytools
2018-03-05 15:24:13,429 - cli.py[main:161](61993) - INFO  - verbose level: 2 (INFO)
2018-03-05 15:24:13,429 - utils.py[log_option:2203](61993) - INFO  - timeout:  500
2018-03-05 15:24:13,429 - utils.py[log_option:2203](61993) - INFO  - host:  localhost
2018-03-05 15:24:13,429 - utils.py[log_option:2203](61993) - INFO  - port:  8080
2018-03-05 15:24:13,430 - utils.py[log_option:2203](61993) - INFO  - user:  admin
2018-03-05 15:24:13,431 - utils.py[log_option:2203](61993) - INFO  - password:  <omitted>
2018-03-05 15:24:13,504 - utils.py[log_option:2203](61993) - INFO  - cluster:  hdp
2018-03-05 15:24:13,554 - ambari_trigger_service_checks.py[request_service_checks:283](61993) - INFO  - sending batch schedule check request for services: ZOOKEEPER
2018-03-05 15:24:13,591 - ambari_trigger_service_checks.py[request_service_checks:288](61993) - INFO  - RequestSchedule 28 submitted
2018-03-05 15:24:13,605 - ambari_trigger_service_checks.py[parse_scheduled_request:324](61993) - INFO  - NO STATUS YET: ZOOKEEPER_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 15:24:14,623 - ambari_trigger_service_checks.py[parse_scheduled_request:324](61993) - INFO  - FAILED: ZOOKEEPER_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 15:24:15,642 - ambari_trigger_service_checks.py[parse_scheduled_request:324](61993) - INFO  - FAILED: ZOOKEEPER_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 15:24:16,660 - ambari_trigger_service_checks.py[parse_scheduled_request:324](61993) - INFO  - FAILED: ZOOKEEPER_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 15:24:17,675 - ambari_trigger_service_checks.py[parse_scheduled_request:324](61993) - INFO  - FAILED: ZOOKEEPER_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 15:24:18,691 - ambari_trigger_service_checks.py[parse_scheduled_request:324](61993) - INFO  - FAILED: ZOOKEEPER_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 15:24:19,708 - ambari_trigger_service_checks.py[parse_scheduled_request:324](61993) - INFO  - FAILED: ZOOKEEPER_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 15:24:20,723 - ambari_trigger_service_checks.py[parse_scheduled_request:324](61993) - INFO  - FAILED: ZOOKEEPER_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 15:24:21,738 - ambari_trigger_service_checks.py[parse_scheduled_request:324](61993) - INFO  - FAILED: ZOOKEEPER_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Michael Bronson

I have reviewed the "ambari_trigger_service_checks.py" script from here: https://github.com/HariSekhon/pytools/blob/master/ambari_trigger_service_checks.py#L366

And it looks like there is an issue with the Command name generation as the Zookeeper service name command name is actually "ZOOKEEPER_QUORUM_SERVICE_CHECK" and not "ZOOKEEPER_SERVICE_CHECK"

.

I have suggested a fix in the script here. https://github.com/HariSekhon/pytools/pull/5/files ( @Hari Sekhon )

.

Fixed Script: So if you want to test the fix then please use this script from the following repo: https://github.com/jaysensharma/pytools/blob/Zookeeper_Service_Check_Branch/ambari_trigger_service_c...

(Click here to download the script)

View solution in original post

3 REPLIES 3

avatar
Master Mentor

@Michael Bronson

I have reviewed the "ambari_trigger_service_checks.py" script from here: https://github.com/HariSekhon/pytools/blob/master/ambari_trigger_service_checks.py#L366

And it looks like there is an issue with the Command name generation as the Zookeeper service name command name is actually "ZOOKEEPER_QUORUM_SERVICE_CHECK" and not "ZOOKEEPER_SERVICE_CHECK"

.

I have suggested a fix in the script here. https://github.com/HariSekhon/pytools/pull/5/files ( @Hari Sekhon )

.

Fixed Script: So if you want to test the fix then please use this script from the following repo: https://github.com/jaysensharma/pytools/blob/Zookeeper_Service_Check_Branch/ambari_trigger_service_c...

(Click here to download the script)

avatar
Master Mentor

@Michael Bronson

After the fix you should see the Zookeeper Service check passes as following:

# python ambari_trigger_service_checks.py  -u admin -p admin -C plain_ambari --services=ZOOKEEPER --wait --timeout=500
2018-03-05 23:21:55,672 - utils.py[log_option:2203](8141) - INFO  - timeout:  500
2018-03-05 23:21:55,673 - cli.py[main:159](8141) - INFO  - Hari Sekhon ambari_trigger_service_checks.py version 0.2 =>  CLI version 0.9.1 =>  Utils version 0.11.2
2018-03-05 23:21:55,673 - cli.py[main:160](8141) - INFO  - https://github.com/harisekhon/pytools
2018-03-05 23:21:55,673 - cli.py[main:161](8141) - INFO  - verbose level: 2 (INFO)
2018-03-05 23:21:55,673 - utils.py[log_option:2203](8141) - INFO  - timeout:  500
2018-03-05 23:21:55,673 - utils.py[log_option:2203](8141) - INFO  - host:  localhost
2018-03-05 23:21:55,673 - utils.py[log_option:2203](8141) - INFO  - port:  8080
2018-03-05 23:21:55,674 - utils.py[log_option:2203](8141) - INFO  - user:  admin
2018-03-05 23:21:55,674 - utils.py[log_option:2203](8141) - INFO  - password:  <omitted>
2018-03-05 23:21:55,736 - utils.py[log_option:2203](8141) - INFO  - cluster:  plain_ambari
2018-03-05 23:21:55,799 - ambari_trigger_service_checks.py[request_service_checks:283](8141) - INFO  - sending batch schedule check request for services: ZOOKEEPER
2018-03-05 23:21:55,979 - ambari_trigger_service_checks.py[request_service_checks:288](8141) - INFO  - RequestSchedule 157 submitted
2018-03-05 23:21:55,989 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - NO STATUS YET: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:21:57,003 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:21:58,014 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:21:59,025 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:00,042 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:01,058 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:02,086 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:03,098 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:04,111 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:05,122 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:06,142 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:07,160 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:08,180 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:09,198 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:10,215 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:11,248 - ambari_trigger_service_checks.py[parse_scheduled_request:324](8141) - INFO  - IN_PROGRESS: ZOOKEEPER_QUORUM_SERVICE_CHECK: ZOOKEEPER Service Check (batch 1 of 1)
2018-03-05 23:22:12,260 - ambari_trigger_service_checks.py[parse_scheduled_request:310](8141) - INFO  - COMPLETED

.

avatar
New Contributor

That was merged to master, thanks for the pull request!