Story #2108
closedAdd option to puppet_install distributor to install to 'modules' directory and cleanup base directory
100%
Description
The current puppet_install distributor installs to whatever path the user specifies. If you are wanting to install to a puppet master you'd have to specify:
/etc/puppet/environments/MYENV/modules/
However when we delete the repository, the distributor cleanup logic only deletes:
/etc/puppet/environments/MYENV/modules
With the current implementation pulp cannot know to safely remove the MYENV directory. One solution would be to provide some option such that the user could just specify
/etc/puppet/environments/MYENV/
and pulp would automatically populate the modules under ./modules/. Then at delete time pulp could safely delete the MYENV directory.
Updated by bmbouter over 8 years ago
- Tracker changed from Issue to Story
This sounds good, but since we would be adding an option I need to switch it to be a story.
Updated by jsherril@redhat.com over 8 years ago
This isn't critical, but we currently have to carry a cronjob to work around this issue and would love to get rid of it.
Updated by bmbouter over 8 years ago
There is some issue with the description. It says that you want to delete /etc/puppet/environments/MYENV/ and that it does delete /etc/puppet/environments/MYENV/. Did you mean /etc/puppet/environments/MYENV/modules/ instead?
Updated by jsherril@redhat.com over 8 years ago
Yes, updated the description to fix that. Good catch!
Updated by mhrivnak over 8 years ago
- Subject changed from Add option to puppet_install distributor to install to 'modules' diretory and cleanup base directory to Add option to puppet_install distributor to install to 'modules' directory and cleanup base directory
From my comment on the associated BZ, regarding the "modules" directory: "I imagine we'd add a setting called something like "create_modules_dir", that would have it create that directory during deployment, and clean it up on removal."
Adding such a setting could allow the distributor to preserve compatibility with existing behavior.
Updated by bmbouter about 8 years ago
- Sprint Candidate changed from No to Yes
Is this description right? Would the install_path be set to /etc/puppet/environments/MYENV/modules/
or would it be /etc/puppet/environments/MYENV/modules/modulename/
?
Updated by mhrivnak about 8 years ago
I think the install_path would be "/etc/puppet/environments/MYENV/"
Then there would be an additional option. It could be:
subdir = 'modules'
in which case pulp would create a subdirectory called "modules" and put stuff in that. It would allow the distributor to be the explicit owner of "/etc/puppet/environments/MYENV/", and thus delete it with confidence during cleanup.
Updated by bmbouter about 8 years ago
+1 to the subdir option which would default to ''
Link to where the docs should go: http://docs.pulpproject.org/plugins/pulp_puppet/tech-reference/plugin_conf.html#install-distributor
Updated by mhrivnak about 8 years ago
I clarified the fourth bullet point. bmbouter may want to have a look, since I'm not sure if you had a different understanding of the behavior, or just described it in a way that read differently to me.
Updated by bmbouter about 8 years ago
- Groomed changed from No to Yes
mhrivnak, all ^ looks good, so I'm going to go ahead and groom it.
Updated by bizhang almost 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bizhang
Updated by bizhang almost 8 years ago
- Status changed from ASSIGNED to POST
Added by bizhang almost 8 years ago
Updated by bizhang almost 8 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset 575873a4d5c0b60771ef0cb66eabce17da105b1e.
Updated by pcreech over 7 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Add subdir option to puppet install distributor
Puppet master modules should be allowed to be installed in a MYENV/modules directory where deleting the puppet repo should remove the MYENV directory. This allows the user to specify a subdir in which modules could be installed.
closes #2108 https://pulp.plan.io/issues/2108