Skip to content

(PUP-8988) Define vendormoduledir as a string#6939

Merged
jhelwig merged 1 commit intopuppetlabs:masterfrom
joshcooper:PUP8988-use-string-setting
Jul 25, 2018
Merged

(PUP-8988) Define vendormoduledir as a string#6939
jhelwig merged 1 commit intopuppetlabs:masterfrom
joshcooper:PUP8988-use-string-setting

Conversation

@joshcooper
Copy link
Contributor

@joshcooper joshcooper commented Jul 23, 2018

Calling Puppet.settings.use(<section>) will create files and directories
for all of the :file and :directory based settings in that section.
Previously, running puppet lookup as a non-root user failed, because
lookup uses the master section, the vendormodulesdir setting is
defined in the master section, and the user did not have permission to
create the /opt/puppetlabs/puppet/vendor_modules directory.

This commit changes the vendormoduledir setting to be of type :string.
This way puppet never tries to manage its existence via a settings
catalog. It doesn't use :path, because that settings type is reserved
for settings that allow multiple directories separated by
File::PATH_SEPARATOR.

@joshcooper
Copy link
Contributor Author

/cc @rbrw

@joshcooper joshcooper requested a review from jhelwig July 23, 2018 23:18
@joshcooper joshcooper force-pushed the PUP8988-use-string-setting branch 2 times, most recently from c817a59 to 2755ce9 Compare July 24, 2018 00:25
@puppetcla
Copy link

CLA signed by all contributors.

@joshcooper
Copy link
Contributor Author

jenkins please test this on windows2012r2-64a

Calling `Puppet.settings.use(<section>)` will create files and directories
for all of the `:file` and `:directory` based settings in that section.
Previously, running `puppet lookup` as a non-root user failed, because
lookup uses the `master` section, the `vendormodulesdir` setting is
defined in the `master` section, and the user did not have permission to
create the `/opt/puppetlabs/puppet/vendor_modules` directory.

This commit changes the vendormoduledir setting to be of type `:string`.
This way puppet never tries to manage its existence via a settings
catalog. It doesn't use `:path`, because that settings type is reserved
for settings that allow multiple directories separated by
File::PATH_SEPARATOR.
@joshcooper joshcooper force-pushed the PUP8988-use-string-setting branch from 2755ce9 to d61d834 Compare July 25, 2018 16:22
@joshcooper
Copy link
Contributor Author

The build failed because the PR didn't include the revert of the mount type/provider. I rebased on master.

@joshcooper
Copy link
Contributor Author

jenkins please test this on windows2012r2-64a

@jhelwig jhelwig merged commit bb50544 into puppetlabs:master Jul 25, 2018
@joshcooper joshcooper deleted the PUP8988-use-string-setting branch July 25, 2018 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants