Issue #8847 has been updated by Bengt Giger.

Hi

We ran into this bug with Puppet v3.1.1

Our use case are files that are placed on clients, on the puppet master they 
reside in different repositories but not at the path set in the symlinks. 

Or they are generated on the clients and do not exist on the master. Placing 
fake files to make the symlinks valid is not really an option as it would 
clutter the disk of the master with misplaced files.

The result of copying or skipping a (not intended) dangling link is the same: 
something probably will fail. But the result of skipping a intended dangling 
link is not the same, the system fails while it would not if the link would 
have been copied.

And if the source is a dangling link, there should be no check if the target is 
a valid or a dangling link. The link target may or may not exist, depending of 
what the system administrator wants to achieve.

Regards
Bengt


----------------------------------------
Bug #8847: Symlinks in directories copied in a recursive 'file' resource will 
not be copied if they don't resolve on the puppet master
https://projects.puppetlabs.com/issues/8847#change-97086

* Author: Sam Cannell
* Status: Needs More Information
* Priority: Normal
* Assignee: Nigel Kersten
* Category: file
* Target version: 
* Affected Puppet version: 2.6.2
* Keywords: 
* Branch: 
----------------------------------------
Consider the following puppet module:

    puppetmaster:/etc/puppet # find modules/symlinktest/
    modules/symlinktest/
    modules/symlinktest/files
    modules/symlinktest/files/tmp
    modules/symlinktest/files/tmp/symlinktest
    modules/symlinktest/files/tmp/symlinktest/symlink
    modules/symlinktest/manifests
    modules/symlinktest/manifests/init.pp 

    puppetmaster:/etc/puppet # cat modules/symlinktest/manifests/init.pp 
    class symlinktest {
        file { "/tmp/symlinktest":
            source  => 
"puppet://${servername}/modules/${module_name}/tmp/symlinktest",
            recurse => true,
        }
    }



'symlink' in the symlinktest directory is a symbolic link pointing to a file 
outside the directory being copied:

    puppetmaster:/etc/puppet # ls -l 
modules/symlinktest/files/tmp/symlinktest/symlink 
    lrwxrwxrwx 1 root puppet 9 2011-08-09 17:00 
modules/symlinktest/files/tmp/symlinktest/symlink -> /etc/file 



The file referenced by the symbolic link does not exist on the puppet master:

    puppetmaster:/etc/puppet # ls -l /etc/file
    ls: cannot access /etc/file: No such file or directory



Trying to run this module on a client will fail trying to create 'symlink':

    client:~ # puppetd -tv
    info: Caching catalog for puppetmaster.domain
    info: Applying configuration version '1312866094'
    notice: /Stage[main]/Symlinktest/File[/tmp/symlinktest]/ensure: created
    err: /File[/tmp/symlinktest/symlink]: Could not evaluate: Could not 
retrieve information from source(s) 
puppet://puppetmaster.domain/modules/symlinktest/tmp/symlinktest/symlink
    notice: Finished catalog run in 10.50 seconds



If I create the file on the puppet master (once again, note that this file is 
outside the /etc/puppet tree) the module runs fine:

    puppetmaster:/etc/puppet # touch /etc/file 
    
    client:~ # puppetd -tv
    info: Caching catalog for puppetmaster.domain
    info: Applying configuration version '1312866094'
    notice: /Stage[main]/Symlinktest/File[/tmp/symlinktest]/ensure: created
    notice: /File[/tmp/symlinktest/symlink]/ensure: created
    notice: Finished catalog run in 10.51 seconds
    
    client:~ # ls -l /tmp/symlinktest/
    total 0
    lrwxrwxrwx 1 root puppet 9 2011-08-09 17:06 symlink -> /etc/file


This issue occurs whether the class is contained within a module or the base 
manifests.  It appears to affect puppet 2.6.2 but *not* 0.25.4.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to