The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #1825

Cannot create symlink with file type when links => follow is set

Added by Jean-Baptiste Quenot over 5 years ago. Updated over 3 years ago.

Status:AcceptedStart date:12/16/2008
Priority:LowDue date:
Assignee:-% Done:

0%

Category:file
Target version:-
Affected Puppet version:0.24.6 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

I have trouble creating symlinks with the following recipe:

# Default behaviour for file type:
# Do not copy symlinks as-is, copy the target
File {
  links => follow
}

file { "/usr/share/tonio/app/pre":
    ensure => "/var/www/tonio.com/pre"
}

notice: Ignoring cache
info: Caching catalog at /var/lib/puppet/state/localconfig.yaml
notice: Starting catalog run
notice: //Node[nc_webserver]/webserver/web_server/File[/usr/share/tonio/app/pre]: Recursively backing up to filebucket
notice: //Node[nc_webserver]/webserver/web_server/File[/usr/share/tonio/app/pre]: Not removing directory; use 'force' to override
notice: //Node[nc_webserver]/webserver/web_server/File[/usr/share/tonio/app/pre]: Recursively backing up to filebucket
notice: //Node[nc_webserver]/webserver/web_server/File[/usr/share/tonio/app/pre]: Not removing directory; use 'force' to override
err: //Node[nc_webserver]/webserver/web_server/File[/usr/share/tonio/app/pre]/ensure: change from directory to link failed: Could not remove existing file

I guess Puppet does not like when I combine “links => follow” with creating a symlink with ensure. Follow should be ignored in this case.

History

#1 Updated by Luke Kanies over 5 years ago

  • Category set to file
  • Status changed from Unreviewed to Accepted
  • Priority changed from Normal to Low

This is another one of those cases where I wouldn’t have thought anyone would ever do this, but I can see why you would, I guess.

I agree it’s a bug, but obviously low priority. You can easily work around it by adding ‘links => manage’ to those files you’re creating as links.

#2 Updated by Markus Roberts over 4 years ago

  • Target version set to 0.25.3

#3 Updated by Markus Roberts over 4 years ago

  • Target version changed from 0.25.3 to 0.25.4

#4 Updated by James Turnbull over 4 years ago

  • Target version changed from 0.25.4 to 0.25.5

#5 Updated by James Turnbull about 4 years ago

  • Target version changed from 0.25.5 to 49

#6 Updated by James Turnbull over 3 years ago

  • Target version deleted (49)

Also available in: Atom PDF