Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

REST API disable / enable service auto start by API

Solved Go to solution

REST API disable / enable service auto start by API

how to disable service auto start by API as the following

64569-capture.png

how to enable service auto start by API as the following

64570-capture1.png

Michael-Bronson
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: REST API disable / enable service auto start by API

Super Mentor
4 REPLIES 4
Highlighted

Re: REST API disable / enable service auto start by API

Super Mentor

Re: REST API disable / enable service auto start by API

the api from from this link answer about to enable all services , but what we need is only to enable / disable the auto start services , as described in the pictures ( like click on button to disable (pic1) ,and click on the button to enable (pic2) )

Michael-Bronson

Re: REST API disable / enable service auto start by API

Super Mentor

@Michael Bronson

Through API call it will be bit complex because ambari client needs to send a very huge Payload to make that change.

However the easiest option will be to use the following approach from ambari server host:

To Enable Auto start Services

# /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=set --host=localhost --cluster=TestCluster --config-type=cluster-env -k "recovery_enabled" -v "true"

.

To Disable Auto start Services

# /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=set --host=localhost --cluster=TestCluster --config-type=cluster-env -k "recovery_enabled" -v "false"

.

Please change the Cluster name "TestCluster" and ambari credentials in the above script .

Above script needs to be executed from ambari server host as it has the "config.py" file.

Re: REST API disable / enable service auto start by API

@Jay thank you so much , regrading the cluster size ( https://community.hortonworks.com/questions/177371/cant-start-ambari-collector.html ) , dose cluster size mean - Number of workers machines ?

Michael-Bronson
Don't have an account?
Coming from Hortonworks? Activate your account here