HomePhorge

(PUP-3935) Fix pluginsync errors when dealing with symlinks
a6f7ff21adc7Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-3935) Fix pluginsync errors when dealing with symlinks

Currently, Puppet produces one of two pluginsync errors during an
agent run if the root of a modulepath directory is a symlink
and no modules contain a facts.d or lib directory.

In the normal case, when the base module path is a directory
and none if its modules include facts.d or lib directories,
pluginsync returns the path to the module path directory itself,
at which point the file type disables recursion in its
recurse_remote method and stops the agent from attempting to
download plugins.

However, if the base module path is not a directory (in this case
a link), recurse_remote returns early, causing the agent-side
facts.d or lib directory to not have its 'source' metadata set,
leading to a failing query back to the master.

This commit forces pluginsync to follow symlinks rather than
manage them. To do this, the :links attribute is set to :follow
in the #default_arguments method of the
Puppet::Configurer::Downloader class, which is only used
for pluginsync. Doing this ensures that what pluginsync
returns will be a directory rather than a link, allowing the
resource to have its source metadata correctly set.

Paired with Peter Huene <peter.huene@puppetlabs.com>

Details

Provenance
Will Hopper <whopper@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU0f551b396742: Merge branch 'pr/3528'
Branches
Unknown
Tags
Unknown

Event Timeline

Will Hopper <whopper@puppetlabs.com> committed rPUa6f7ff21adc7: (PUP-3935) Fix pluginsync errors when dealing with symlinks (authored by Will Hopper <whopper@puppetlabs.com>).Feb 1 2015, 5:39 AM