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

avatar

OK I will replace to -X PUT

Michael-Bronson

avatar

after changes we get Heartbeat Lost for all services ( and I cant start/stop service on all machines )

Michael-Bronson

avatar

after changes we get Heartbeat Lost for all services

Michael-Bronson

avatar
Master Mentor

@uri ben-ari

Have you tried restarting all the agents?

Are the agent hosts able to communicate to ambari server on port 8440?

Example: (from agent machines try to connect to ambari)

#  telnet   $AMBARI_HOSTNAME   8440
(OR)
# nc  -v   $AMBARI_HOSTNAME   8440

.

Also do you see any error on ambari-server or agent logs?

/var/log/ambari-server/ambari-server.log

/var/log/ambari-agent/ambari-agent.log

.

avatar

I will try now

Michael-Bronson

avatar

yes we have telnet VIA PORT , and we restart all agent but still with the problem , I think delete the blueprint.json is little risky

Michael-Bronson

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

avatar

after changes , ambari cluster seems to be bad ( we have Heartbeat Lost on all services )

Michael-Bronson