Issue #8847 has been reported by Sam Cannell.

----------------------------------------
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

Author: Sam Cannell
Status: Unreviewed
Priority: Normal
Assignee: 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to