Jira (PUP-4867) Puppets modulepath setting should be made into separate settings for distmoduledir / sitemoduledir

2 views
Skip to first unread message

Ethan Brown (JIRA)

unread,
Jul 15, 2015, 12:08:17 PM7/15/15
to puppe...@googlegroups.com
Ethan Brown created an issue
 
Puppet / New Feature PUP-4867
Puppets modulepath setting should be made into separate settings for distmoduledir / sitemoduledir
Issue Type: New Feature New Feature
Assignee: Unassigned
Created: 2015/07/15 9:07 AM
Fix Versions: PUP 5.0.0
Priority: Normal Normal
Reporter: Ethan Brown

There are a number of problems that arise when performing acceptance testing, that stem from the fact that Puppet has a single modulepath. This path is a combination of:

  • a global module directory that has historically been called sitemoduledir
    • /usr/share/puppet/modules then /opt/puppetlabs/puppet/modules with the advent of AIO for non-Windows platforms
    • C:/usr/share/puppet/modules then non-existent with the advent of AIO for Windows platforms, since it has never been used and is an invalid path
  • a local install module directory that has historically been called distmoduledir
    • /etc/puppet/modules then /etc/puppetlabs/code/modules with the advent of AIO for non-Windows platforms
    • C:/Program Files//PuppetLabs/puppet/etc/modules then C:/Program Files/PuppetLabs/code/modules with the advent of AIO on Windows

Often acceptance tests need to express these independently, rather than through a single modulepath setting in Puppet, so testing tools have to be aware / take special care in configuring Puppet properly.

If these settings could be set independently, then a lot of this churn could go away, and tools like Beaker could introspect Puppet instead of the current state of affairs.

See the current code at:
https://github.com/puppetlabs/puppet/blob/5440053fb0e99b792f0a60ee773e6805e76e610a/lib/puppet/defaults.rb#L962-L975

Given this has many touch points across Puppet and toolchains that integrate with / consume Puppet, this should be considered a large effort.

Targeted at Puppet 5 since this is a breaking change.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c)
Atlassian logo

Geoff Nichols (JIRA)

unread,
Apr 12, 2017, 1:59:43 PM4/12/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Fix Version/s: PUP 5.0.0
Fix Version/s: PUP 6.0.0
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

John Duarte (JIRA)

unread,
May 17, 2017, 2:39:05 PM5/17/17
to puppe...@googlegroups.com

Matthew Patton (JIRA)

unread,
Aug 4, 2017, 1:37:02 AM8/4/17
to puppe...@googlegroups.com
Matthew Patton commented on New Feature PUP-4867
 
Re: Puppets modulepath setting should be made into separate settings for distmoduledir / sitemoduledir

Might as well add the missing 'local_module_dir'. Really these vars should be formatted with hyphens. If ModulePath is expressly defined than these 3 helpers are ignored. Otherwise they get glued together with BaseModulePath.

Why not take a page out of Perl's book and make the directory names a bit more explicit? (if the word '-modules' is excessive, then shorten).

'/usr/share/puppet/site-modules' = sysadmin provided often 3rd party (Forge) that are frequently shared across hosts via common filesystem mount.

  • '/opt/puppetlabs/puppet/vendor-modules' = ONLY modules that are shipped with distribution packages. A purist would insist all 3rd party (eg. Forge) modules do NOT go under /opt/puppetlabs even if inside a 'site-module' subdirectory (same applies to Facts), but the installed base may be too wed to using the /opt/puppetlabs path instead of /usr/local/share. Or may consider Forge to be official enough to merit inclusion.
  • '/etc/puppet[labs/code/]modules' = modules specific to a host. But this really should be deprecated and steered (symlink?) to '/usr/local/share/puppet/modules'. /etc is properly reserved for system-wide or environment-based configuration data (Facts, Hiera, Node) only. It is improper to store potentially sizable code or executables here.

I don't see why a hard-line stance can't be taken. It's not so difficult to move things to where they should have been all along. If some users don't like the new defaults, they can always add directives to puppet.conf

ref: https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

Kenn Hussey (JIRA)

unread,
Jun 21, 2018, 12:48:04 PM6/21/18
to puppe...@googlegroups.com
Kenn Hussey updated an issue
 
Change By: Kenn Hussey
Team: Platform Core
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Aug 29, 2018, 2:43:04 PM8/29/18
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Aug 21, 2020, 6:33:03 PM8/21/20
to puppe...@googlegroups.com
Josh Cooper commented on New Feature PUP-4867
 
Re: Puppets modulepath setting should be made into separate settings for distmoduledir / sitemoduledir

Given we already have modulepath, basemodulepath and vendormoduledir, and the modulepath related settings in environment.conf, I think adding more modulepath settings will make things more confusing, without much code benefit. I'm going to close this, but let me know if I've missed something.

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages