{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/puppet/issues/3547","labels_url":"https://api.github.com/repos/puppetlabs/puppet/issues/3547/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/issues/3547/comments","events_url":"https://api.github.com/repos/puppetlabs/puppet/issues/3547/events","html_url":"https://github.com/puppetlabs/puppet/pull/3547","id":56151014,"number":3547,"title":"(Pending ticket)(PUP-XYZ) Fix pluginsync errors when dealing with symlinks","user":{"login":"whopper","id":507621,"avatar_url":"https://avatars.githubusercontent.com/u/507621?v=3","gravatar_id":"","url":"https://api.github.com/users/whopper","html_url":"https://github.com/whopper","followers_url":"https://api.github.com/users/whopper/followers","following_url":"https://api.github.com/users/whopper/following{/other_user}","gists_url":"https://api.github.com/users/whopper/gists{/gist_id}","starred_url":"https://api.github.com/users/whopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whopper/subscriptions","organizations_url":"https://api.github.com/users/whopper/orgs","repos_url":"https://api.github.com/users/whopper/repos","events_url":"https://api.github.com/users/whopper/events{/privacy}","received_events_url":"https://api.github.com/users/whopper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-01T04:03:44Z","updated_at":"2015-02-01T04:05:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/3547","html_url":"https://github.com/puppetlabs/puppet/pull/3547","diff_url":"https://github.com/puppetlabs/puppet/pull/3547.diff","patch_url":"https://github.com/puppetlabs/puppet/pull/3547.patch"},"body":"Currently, Puppet produces one of two pluginsync errors during an\r\nagent run if the root of a modulepath directory is a symlink\r\nand no modules contain a facts.d or lib directory.\r\n\r\nIn the normal case, when the base module path is a directory\r\nand none if its modules include facts.d or lib directories,\r\npluginsync returns the path to the module path directory itself,\r\nat which point the file type disables recursion in its\r\n`recurse_remote` method and stops the agent from attempting to\r\ndownload plugins.\r\n\r\nHowever, if the base module path is not a directory (in this case\r\na link), `recurse_remote` returns early, causing the agent-side\r\nfacts.d or lib directory to not have its 'source' metadata set,\r\nleading to a failing query back to the master.\r\n\r\nThis commit forces pluginsync to follow symlinks rather than\r\nmanage them. To do this, the :links attribute is set to :follow\r\nin the #default_arguments method of the\r\nPuppet::Configurer::Downloader class, which is only used\r\nfor pluginsync. Doing this ensures that what pluginsync\r\nreturns will be a directory rather than a link, allowing the\r\nresource to have its source metadata correctly set.\r\n\r\nPaired with Peter Huene <peter.huene@puppetlabs.com>"},"comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/issues/comments/72350510","html_url":"https://github.com/puppetlabs/puppet/pull/3547#issuecomment-72350510","issue_url":"https://api.github.com/repos/puppetlabs/puppet/issues/3547","id":72350510,"user":{"login":"whopper","id":507621,"avatar_url":"https://avatars.githubusercontent.com/u/507621?v=3","gravatar_id":"","url":"https://api.github.com/users/whopper","html_url":"https://github.com/whopper","followers_url":"https://api.github.com/users/whopper/followers","following_url":"https://api.github.com/users/whopper/following{/other_user}","gists_url":"https://api.github.com/users/whopper/gists{/gist_id}","starred_url":"https://api.github.com/users/whopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whopper/subscriptions","organizations_url":"https://api.github.com/users/whopper/orgs","repos_url":"https://api.github.com/users/whopper/repos","events_url":"https://api.github.com/users/whopper/events{/privacy}","received_events_url":"https://api.github.com/users/whopper/received_events","type":"User","site_admin":false},"created_at":"2015-02-01T04:05:17Z","updated_at":"2015-02-01T04:05:17Z","body":"I need to clarify in https://tickets.puppetlabs.com/browse/PUP-3324 whether the issue there was that symlinks were involved. If so we can use that ticket."}}