Project

Profile

Help

Story #2108

closed

Add option to puppet_install distributor to install to 'modules' directory and cleanup base directory

Added by jsherril@redhat.com almost 6 years ago. Updated about 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
2.13.0
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
Sprint 15
Quarter:

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.

Actions #2

Updated by bmbouter almost 6 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.

Actions #3

Updated by jsherril@redhat.com almost 6 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.

Actions #4

Updated by bmbouter almost 6 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?

Actions #5

Updated by jsherril@redhat.com almost 6 years ago

  • Description updated (diff)
Actions #6

Updated by jsherril@redhat.com almost 6 years ago

Yes, updated the description to fix that. Good catch!

Actions #7

Updated by mhrivnak almost 6 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.

Actions #9

Updated by bmbouter over 5 years ago

  • Description updated (diff)
Actions #10

Updated by bmbouter over 5 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/?

Actions #11

Updated by mhrivnak over 5 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.

Actions #12

Updated by bmbouter over 5 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

Actions #13

Updated by mhrivnak over 5 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.

Actions #14

Updated by mhrivnak over 5 years ago

  • Description updated (diff)
Actions #15

Updated by bmbouter over 5 years ago

  • Groomed changed from No to Yes

mhrivnak, all ^ looks good, so I'm going to go ahead and groom it.

Actions #16

Updated by mhrivnak over 5 years ago

  • Sprint/Milestone set to 31
Actions #17

Updated by bizhang over 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bizhang
Actions #18

Updated by mhrivnak over 5 years ago

  • Sprint/Milestone changed from 31 to 32
Actions #19

Updated by bizhang over 5 years ago

  • Status changed from ASSIGNED to POST
Actions #20

Updated by mhrivnak over 5 years ago

  • Sprint/Milestone changed from 32 to 33

Added by bizhang over 5 years ago

Revision 575873a4

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

Actions #21

Updated by bizhang over 5 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #22

Updated by semyers about 5 years ago

  • Platform Release set to 2.13.0
Actions #23

Updated by pcreech about 5 years ago

  • Status changed from MODIFIED to 5
Actions #24

Updated by pcreech about 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #25

Updated by bmbouter about 4 years ago

  • Sprint set to Sprint 15
Actions #26

Updated by bmbouter about 4 years ago

  • Sprint/Milestone deleted (33)
Actions #27

Updated by bmbouter about 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF