Created 10-31-2017 10:51 AM
Hey all,
I've been playing with some automation that copies an unpacked parcel into /opt/cloudera/parcels and CM has no problem with activating it, adding it as a service, etc. as long as I've disabled CM's Manage parcels option. The problem I get is that, even if activated and running, once I enable Manage parcels in the CM configs, it immediately goes and undistributes the parcel and deletes its files. Is there any step I can take before enabling this option that tells CM to leave my parcel alone?
Created 10-31-2017 11:54 AM
There's no way to stop deactivation of the parcel, because when you enable CM server parcel management, the
CM server doesn't have that parcel activated and thus the CM agent must deactivate the parcel.
However, you can short-circuit un-distribution and re-distribution by creating a ".dont_delete" file inside the
parcel directory. The agent will go through the motions of undistributing the parcel, but it won't actually delete
the directory. When you go to distribute the parcel again, it will re-distribute, but the agent will skip the download
step.
Created 10-31-2017 11:54 AM
There's no way to stop deactivation of the parcel, because when you enable CM server parcel management, the
CM server doesn't have that parcel activated and thus the CM agent must deactivate the parcel.
However, you can short-circuit un-distribution and re-distribution by creating a ".dont_delete" file inside the
parcel directory. The agent will go through the motions of undistributing the parcel, but it won't actually delete
the directory. When you go to distribute the parcel again, it will re-distribute, but the agent will skip the download
step.
Created 10-31-2017 12:25 PM
Thanks for the reply, @mostrows. Putting that file inside the directory does prevent it from being deleted, but I think there must be a bug (at least in CM 5.12.0, which I'm running).
In my case, I have the unpacked parcel in place when the machine comes up. If I don't activate it before re-enabling "Manage Parcels," CM undistributes it, but then the only option is to download it again, which doesn't skip and pulls the whole parcel from my online repo. If I do activate it before enabling "Manages Parcels," CM "undistributes" it (as you said it would) without deleting any files and then tries to activate it automatically, but then simply gets stuck in the "Activating" stage forever.
Created 10-31-2017 12:34 PM
Created 10-31-2017 02:44 PM
Could you tell us why you would need to enable "Manages Parcels"?
Are you trying to let CM do the distribution?
Created 10-31-2017 02:49 PM
Basically, I want the ability for my automation to handle certain parcels (e.g. CDH) at start time, but then after things are online, still allow users to add their own parcel repos and manage new parcels through the web UI. As it stands, this can't quite be done.