I am creating a python script which is based on CM API to add hosts to a cluster.
My challenges is:
I couldn't find which API call to distribute parcel to hosts especially if there is a way to install the parcel on specified hosts. I checked the following link but didn't find anything useful:
Actually, I found some examples here:
But the problem in those examples is that the API download/distribute/activate the parcel on all cluster nodes, I am not feeling comfortable doing that as if the script by accident specified a wrong parcel, it will screw up the entire cluster, is there a way to download the parcel to a certain host only?
Our CM server has two parcels installed-- cdh4.7 and cdh5.5.1. Currently cdh5.5.1 is active.
By doing a test on a test cluster, I found I can directly activate cdh4.7 parcel without deactivate cdh5.5.1 first, and after that cdh 5.5.1 only shows an upgrade option( I cannot activate it). To re-activate cdh5.5.1 parcel, I have to go through the cluster upgrade wizard again and of course the wizard would fail in HDFS metadata upgrade step as the cluster had already been upgraded to CDH5.
Although I can do some safety guard such as make sure the parcel version is 5.5.1 before distribute and activate it, remove chd old cdh4.7 parcel etc. But I still feel not very comfortable to use the parcel API call for the entire cluster.
I hope Cloudera can improve the parcel management by doing one or both of the following:
1: Before activate a new parcel, the current parcel need to be deactivate first.
2: Instead of pushing a parcel to the entire cluser, admin has option to push to certain host. I know the cluster should have the same parcel on every host, but I hope at least make this option optional. CM can show a warning flag if not all hosts run the same parcel.
Thanks! So in my script, I just need to run distribute and active the parcel, I don't need to download it. Is that what you mean?
Sorry I mean just distribute the parcel without download or activate it. Is that right? This is becuase the parcle is already downloaded and activated.
The question is that to add a new host to the cluster. Since the parcle is already downloaded, distributed and activated cluster wise, do I need to at least run distribute for this host? or I just run create_host() call and parcels will be distributed and activated automaitcally on this host?