Support Questions

Find answers, ask questions, and share your expertise

Ambari + change the parameters of the ambari services by auto proccess

avatar

I performed the following steps in order to update some values in Ambari GUI

we have - Ambari cluster GUI ( Version 2.5.0.3 )

lets say we want to change the parameter value ( from YARN service )

yarn.scheduler.minimum-allocation-mb : from 11776 to 11700

so we create first the following blueprint.json file as the following: ( under /tmp )

curl  -u admin:admin -H "X-Requested-By: ambari" -X GET http://101.64.36.20:8080/api/v1/clusters/HDP01?format=blueprint -o /tmp/HDP01_blueprint.json

we delete the existing blueprint from ambari cluster as the following:

curl  -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://101.64.36.20:8080/api/v1/blueprints/HDP01

and finally we update the new blueprint.json back to ambari cluster as the following

curl -u admin:admin -H "X-Requested-By: ambari" -X POST  http://101.64.36.20:8080/api/v1/blueprints/HDP01?validate_topology=false -d @/tmp/HDP01_blueprint.json

to take affect we restart the ambari server

ambari-server restart

we access to the ambari GUI to see the new value but the old value appears

please advice what is wrong with my steps?

the target of my procedure is to replace the values from the ambari cluster by reconfigure the blueprint.json file

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor

@uri ben-ari

Looks similar another thread describing this kind of behaviour: https://community.hortonworks.com/questions/44942/how-to-updatemodify-a-blueprint-once-the-cluster-i...

.

Copying few lines from there:

While the Blueprint POST-ed to Ambari will not change as the state of a cluster changes, you can consider "exporting" a Blueprint from a live cluster. After a set of changes to the cluster (Config changes, services added/deleted, etc), exporting the Blueprint will provide a Blueprint that describes the current state of the cluster, which would be different than the original Blueprint used to create the cluster.

.

Also i guess you should be using "-X PUT" (for update) instead of POST (For adding new setting)

View solution in original post

10 REPLIES 10

avatar

I just thinking to do the same steps on a other ambari cluster , do you sure that this steps are safe , or maybe you already test it on your LAB?

Michael-Bronson