Jira (PUP-11478) puppet server mount points do not follow symlinks

4 views
Skip to first unread message

Jason Grammenos (Jira)

unread,
Mar 18, 2022, 1:32:02 PM3/18/22
to puppe...@googlegroups.com
Jason Grammenos created an issue
 
Puppet / Bug PUP-11478
puppet server mount points do not follow symlinks
Issue Type: Bug Bug
Affects Versions: PUP 6.26.0
Assignee: Unassigned
Created: 2022/03/18 10:31 AM
Priority: Normal Normal
Reporter: Jason Grammenos

Puppet Version: 6.26.0-1focal
Puppet Server Version: 6.18.0-1focal
OS Name/Version: Ubuntu 20.04

Describe your issue in as much detail as possible…

mount point content

jason@puppet01:/installation_files/path/to/$ ll
-r--r----- 1 puppet          it  184 Mar 16 11:41 actual_file.v5
lrwxrwxrwx 1 jason           it   38 Mar 16 11:44 symlink -> actual_file.v5

manifest with symlink that doesnt work

  file { '/path/to/file.v5':
    ensure   => file
    mode    => '0775',
    source  => 'puppet:///installation_files/path/to/symlink',
  }

puppet agent output

root@node01:/usr/local/stuff/project# pnoop
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Applying configuration version '1647459851'
Notice: /Stage[main]/Mm::Mercury::project/File[/usr/local/mercury/project/license.v5]/ensure: current_value 'file', should be 'link' (noop)
Notice: Class[Mm::Mercury::project]: Would have triggered 'refresh' from 1 event
Notice: Stage[main]: Would have triggered 'refresh' from 1 event
Notice: Applied catalog in 20.54 seconds

notice in above that puppet tries to convert the file to a symlink, even though ensure file is set

working manifest without symlink

  file { '/path/to/file.v5':
   ensure   => file
    mode    => '0775',
    source  => 'puppet:///installation_files/path/to/actual_file.v5',
  }

puppet agent output

Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Applying configuration version '1647459798'
Notice: Applied catalog in 19.57 seconds

Describe steps to reproduce…
create a server mount point, inside which place a file and a symlink pointing to the file
deploy the file to a server using puppet
update the puppet configuration to deploy the file via symlink
puppet deploys the symlink not the linked file

Desired Behavior:
symlinks within puppetserver mountpoints should work correctly

Actual Behavior:
puppet deploys the symlink not the file the symlink points to.

Please take a moment and attach any relevant log output and/or manifests. This will help us immensely when troubleshooting the issue.

Examples:
Run puppet agent with --test --trace --debug

Relevant sections of /var/log/puppetlabs/puppetserver/puppetserver.log or any applicable logs from the same directory.

For more detailed information turn up the server logs by upping the log level in the server's logback.xml

Relevant sections of configurations files (puppet.conf, hiera.conf, Server's conf.d, defaults/sysconfig)

For memory issues with server heap dumps are also helpful.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Josh Cooper (Jira)

unread,
Mar 28, 2022, 3:57:02 PM3/28/22
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11478
 
Re: puppet server mount points do not follow symlinks

Puppet's behavior with symlinks depends on the ensure property and links parameter, see https://puppet.com/docs/puppet/6/types/file.html#file-attribute-links. In order to have puppet agent follow the link, you'll need to set:

file { '/path/to/file.v5':
  ensure   => file
  mode    => '0775',
  links => follow,
  source  => 'puppet:///installation_files/path/to/actual_file.v5',
}

Jason Grammenos (Jira)

unread,
Mar 28, 2022, 4:02:01 PM3/28/22
to puppe...@googlegroups.com

thanks josh for clarify my mistake in not setting the links=> follow parameter

Reply all
Reply to author
Forward
0 new messages