Issue #1666 has been updated by luke. Status changed from Accepted to Closed
And numeric recursion hasn't worked as far back as 0.23.2. Based on that fact, and the apparent fact that no one is really trying to use it, I'm going to close this, as it's fixed in master. This is clearly a low-priority ticket, given how few people try to use numeric recursion, so it can wait for that release. ---------------------------------------- Bug #1666: file parameter "recurse => 1" is broken http://projects.reductivelabs.com/issues/show/1666 Author: ohookins Status: Closed Priority: Normal Assigned to: luke Category: file Target version: 0.24.7 Complexity: Unknown Affected version: 0.24.5 Keywords: When using recurse => 1 in a file resource operating on a directory, Puppet will make any requested changes to the specified directory and existing files on the client, but not copy any files over from the fileserver source specified. Here's some examples of the behaviour: <pre> Manifest snippet: file { "/test": owner => mail, group => mail, mode => 0440, source => "puppet:///host/test/"; } ------ Puppet file repo: files/host/gage/: . .. test files/host/gage/test: . .. file1 file2 file3 ------ Directory original contents: [EMAIL PROTECTED] test]# pwd /test [EMAIL PROTECTED] test]# ls -laR .: total 36 drwxr-xr-x 3 root root 4096 Oct 21 10:39 . drwxr-xr-x 23 root root 4096 Oct 21 10:39 .. -rw-r--r-- 1 root root 0 Oct 21 10:39 foo1 -rw-r--r-- 1 root root 0 Oct 21 10:39 foo2 -rw-r--r-- 1 root root 0 Oct 21 10:39 foo3 drwxr-xr-x 2 root root 4096 Oct 21 10:40 subdir ./subdir: total 28 drwxr-xr-x 2 root root 4096 Oct 21 10:40 . drwxr-xr-x 3 root root 4096 Oct 21 10:39 .. -rw-r--r-- 1 root root 0 Oct 21 10:40 bar1 -rw-r--r-- 1 root root 0 Oct 21 10:40 bar2 -rw-r--r-- 1 root root 0 Oct 21 10:40 bar3 ------ After Puppet (as expected): [EMAIL PROTECTED] test]# ls -laR .: total 36 dr-xr-x--- 3 mail mail 4096 Oct 21 10:39 . drwxr-xr-x 23 root root 4096 Oct 21 10:39 .. -rw-r--r-- 1 root root 0 Oct 21 10:39 foo1 -rw-r--r-- 1 root root 0 Oct 21 10:39 foo2 -rw-r--r-- 1 root root 0 Oct 21 10:39 foo3 drwxr-xr-x 2 root root 4096 Oct 21 10:40 subdir ./subdir: total 28 drwxr-xr-x 2 root root 4096 Oct 21 10:40 . dr-xr-x--- 3 mail mail 4096 Oct 21 10:39 .. -rw-r--r-- 1 root root 0 Oct 21 10:40 bar1 -rw-r--r-- 1 root root 0 Oct 21 10:40 bar2 -rw-r--r-- 1 root root 0 Oct 21 10:40 bar3 ------ With "recurse => 1" - permissions are changed on immediate directory, but files are not copied: [EMAIL PROTECTED] test]# ls -laR .: total 36 dr-xr-x--- 3 mail mail 4096 Oct 21 10:39 . drwxr-xr-x 23 root root 4096 Oct 21 10:39 .. -r--r----- 1 mail mail 0 Oct 21 10:39 foo1 -r--r----- 1 mail mail 0 Oct 21 10:39 foo2 -r--r----- 1 mail mail 0 Oct 21 10:39 foo3 dr-xr-x--- 2 mail mail 4096 Oct 21 10:40 subdir ./subdir: total 28 dr-xr-x--- 2 mail mail 4096 Oct 21 10:40 . dr-xr-x--- 3 mail mail 4096 Oct 21 10:39 .. -rw-r--r-- 1 root root 0 Oct 21 10:40 bar1 -rw-r--r-- 1 root root 0 Oct 21 10:40 bar2 -rw-r--r-- 1 root root 0 Oct 21 10:40 bar3 ------ With "recurse => 2" - now affecting the subdirectory, but ONLY NOW copying the files in the 1st level directory: [EMAIL PROTECTED] test]# ls -laR .: total 48 dr-xr-x--- 3 mail mail 4096 Oct 21 10:53 . drwxr-xr-x 23 root root 4096 Oct 21 10:39 .. -r--r----- 1 mail mail 0 Oct 21 10:53 file1 -r--r----- 1 mail mail 0 Oct 21 10:53 file2 -r--r----- 1 mail mail 0 Oct 21 10:53 file3 -r--r----- 1 mail mail 0 Oct 21 10:39 foo1 -r--r----- 1 mail mail 0 Oct 21 10:39 foo2 -r--r----- 1 mail mail 0 Oct 21 10:39 foo3 dr-xr-x--- 2 mail mail 4096 Oct 21 10:40 subdir ./subdir: total 28 dr-xr-x--- 2 mail mail 4096 Oct 21 10:40 . dr-xr-x--- 3 mail mail 4096 Oct 21 10:53 .. -r--r----- 1 mail mail 0 Oct 21 10:40 bar1 -r--r----- 1 mail mail 0 Oct 21 10:40 bar2 -r--r----- 1 mail mail 0 Oct 21 10:40 bar3 ------ After completely removing the directory and running puppet -t (with recurse => 1): [EMAIL PROTECTED] /]# rm -rf test [EMAIL PROTECTED] /]# puppetd -t info: Loading fact trogdorbuild info: Retrieving plugins info: Retrieving facts info: Loading fact trogdorbuild info: /Service[ntpd]: Adding aliases "ntpd" info: /File[/etc/sysconfig/ntpd]: Adding aliases "etc_sysconfig_ntpd" info: /File[/etc/ntp.conf]: Adding aliases "etc_ntp_conf" info: mount[localhost]: Mounted / info: mount[modules]: Mounted info: mount[plugins]: Mounted info: /Package[ntp]: Adding aliases "ntp_package" info: /File[/etc/puppet/puppet.conf]: Adding aliases "etc_puppet_puppet_conf" info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run notice: //Node[gage]/File[/test]/ensure: created info: Loading fact trogdorbuild info: Sent transaction report in 0.26 seconds notice: Finished catalog run in 4.63 seconds [EMAIL PROTECTED] /]# ls -laR test test: total 16 dr-xr-x--- 2 mail mail 4096 Oct 21 10:55 . drwxr-xr-x 23 root root 4096 Oct 21 10:55 .. </pre> I would expect for the files to be copied when recurse => 1 is specified. ---------------------------------------- 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://reductivelabs.com/redmine/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 -~----------~----~----~----~------~----~------~--~---
