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.

Stop CM undistributing my parcel?

Solved Go to solution

Stop CM undistributing my parcel?

New Contributor

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?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Stop CM undistributing my parcel?

Cloudera Employee

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.

5 REPLIES 5

Re: Stop CM undistributing my parcel?

Cloudera Employee

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.

Re: Stop CM undistributing my parcel?

New Contributor

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.

Re: Stop CM undistributing my parcel?

Cloudera Employee
What you describe is reasonable - you’d have to choose between pre-activation of the parcel
and toggling CM management of parcels.

I’d suggest not pre-activating it because chances are that the agent will de-activate it at some point anyways.



Re: Stop CM undistributing my parcel?

Cloudera Employee

Could you tell us why you would need to enable "Manages Parcels"?

 

Are you trying to let CM do the distribution?

 

 

Highlighted

Re: Stop CM undistributing my parcel?

New Contributor

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.

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