Story #2108
Add 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.
Associated revisions
History
#2
Updated by bmbouter over 4 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.
#3
Updated by jsherril@redhat.com over 4 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.
#4
Updated by bmbouter over 4 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?
#5
Updated by jsherril@redhat.com over 4 years ago
- Description updated (diff)
#6
Updated by jsherril@redhat.com over 4 years ago
Yes, updated the description to fix that. Good catch!
#7
Updated by mhrivnak over 4 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.
#9
Updated by bmbouter about 4 years ago
- Description updated (diff)
#10
Updated by bmbouter about 4 years ago
- Checklist item Add a release note about this featre added
- Checklist item Add docs on this feature added
- 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/
?
#11
Updated by mhrivnak about 4 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.
#12
Updated by bmbouter about 4 years ago
- Checklist item changed from Add docs on this feature to Add info about this feature to the puppet_install_distributor docs (see comments 11 and 12 for details and a link)
- Checklist item have subdir option used when the puppet_install_module published added
- Checklist item ensure that the removal still only removes the install_path, not including the subdir on the end of it. (this should Just Work since it's the existing functionality.) added
+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
#13
Updated by mhrivnak about 4 years ago
- Checklist item changed from ensure that the removal still only removes the install_path, not including the subdir on the end of it. (this should Just Work since it's the existing functionality.) to ensure that distributor removal still removes the install_path and everything in it. (this should Just Work since it's the existing functionality.)
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.
#14
Updated by mhrivnak about 4 years ago
- Checklist item Test and document how to transition a pre-existing distributor to start using the new option, while preserving the filesystem location of installed modules. This will likely be very important to katello. added
- Description updated (diff)
#15
Updated by bmbouter about 4 years ago
- Groomed changed from No to Yes
mhrivnak, all ^ looks good, so I'm going to go ahead and groom it.
#16
Updated by mhrivnak about 4 years ago
- Sprint/Milestone set to 31
#17
Updated by bizhang about 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bizhang
#18
Updated by mhrivnak about 4 years ago
- Sprint/Milestone changed from 31 to 32
#19
Updated by bizhang almost 4 years ago
- Checklist item changed from Add a release note about this featre to Add a release note about this feature
- Checklist item Add a release note about this feature set to Done
- Checklist item Add info about this feature to the puppet_install_distributor docs (see comments 11 and 12 for details and a link) set to Done
- Checklist item have subdir option used when the puppet_install_module published set to Done
- Checklist item ensure that distributor removal still removes the install_path and everything in it. (this should Just Work since it's the existing functionality.) set to Done
- Checklist item Test and document how to transition a pre-existing distributor to start using the new option, while preserving the filesystem location of installed modules. This will likely be very important to katello. set to Done
- Status changed from ASSIGNED to POST
#20
Updated by mhrivnak almost 4 years ago
- Sprint/Milestone changed from 32 to 33
#21
Updated by bizhang almost 4 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset 575873a4d5c0b60771ef0cb66eabce17da105b1e.
#22
Updated by semyers almost 4 years ago
- Platform Release set to 2.13.0
#23
Updated by pcreech almost 4 years ago
- Status changed from MODIFIED to 5
#24
Updated by pcreech over 3 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
#25
Updated by bmbouter almost 3 years ago
- Sprint set to Sprint 15
#26
Updated by bmbouter almost 3 years ago
- Sprint/Milestone deleted (
33)
#27
Updated by bmbouter almost 2 years ago
- Tags Pulp 2 added
Please register to edit this issue
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