Story #2108
closed
Add option to puppet_install distributor to install to 'modules' directory and cleanup base directory
Status:
CLOSED - CURRENTRELEASE
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.
- 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.
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.
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?
- Description updated (diff)
Yes, updated the description to fix that. Good catch!
- 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.
- Description updated (diff)
- 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/
?
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.
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.
- Description updated (diff)
- Groomed changed from No to Yes
mhrivnak, all ^ looks good, so I'm going to go ahead and groom it.
- Sprint/Milestone set to 31
- Status changed from NEW to ASSIGNED
- Assignee set to bizhang
- Sprint/Milestone changed from 31 to 32
- Status changed from ASSIGNED to POST
- Sprint/Milestone changed from 32 to 33
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
- Platform Release set to 2.13.0
- Status changed from MODIFIED to 5
- Status changed from 5 to CLOSED - CURRENTRELEASE
- Sprint/Milestone deleted (
33)
Also available in: Atom
PDF
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