Issue #19727 has been updated by Charlie Sharpsteen. Keywords set to customer
---------------------------------------- Bug #19727: Duplicate file resource detection/path validation weirdness with multiple slashes in paths https://projects.puppetlabs.com/issues/19727#change-88165 * Author: Ken Johnson * Status: Accepted * Priority: Normal * Assignee: Charlie Sharpsteen * Category: file * Target version: * Affected Puppet version: 2.7.20 * Keywords: customer * Branch: ---------------------------------------- This was reported by one of our commercial users. It looks like somewhere between version 2.7.6 and 2.7.20 the validation of file resource paths was changed in a way that breaks detection of duplicate resources. The user tested (and I was able to duplicate their results) application of the following resources to systems running Puppet 2.7.6 and 2.7.20: <pre> file { '/tmp/test': ensure => directory, owner => root, group => root, mode => '0755' } file { '//tmp/test': ensure => file, owner => nobody, group => nobody, mode => '0644' } </pre> Under 2.7.6 Puppet detects a collision between the two resources. Under 2.7.20 it treats them as two separate resources. Given the two paths are generally functionally identical I'm thinking the earlier version's behavior is more correct and the change may have been unintentional. <pre> [root@localhost puppet-2.7.6]# facter -p | grep ver facterversion => 1.6.7 kernelmajversion => 2.6 kernelversion => 2.6.18 puppetversion => 2.7.6 rubyversion => 1.9.2 selinux_policyversion => 21 [root@localhost puppet-2.7.6]# puppet apply -v ./test.pp Cannot alias File[//tmp/test] to ["/tmp/test"] at /root/puppet-2.7.6/test.pp:12; resource ["File", "/tmp/test"] already defined at /root/puppet-2.7.6/test.pp:6 </pre> <pre> [root@localhost puppet-2.7.20]# facter -p | grep ver facterversion => 1.6.7 kernelmajversion => 2.6 kernelversion => 2.6.18 puppetversion => 2.7.20 rubyversion => 1.9.2 selinux_policyversion => 21 [root@localhost puppet-2.7.20]# puppet apply -v ./test.pp info: Applying configuration version '1363130541' info: /Stage[main]//File[//tmp/test]: Recursively backing up to filebucket notice: /Stage[main]//File[//tmp/test]: Not removing directory; use 'force' to override info: /Stage[main]//File[//tmp/test]: Recursively backing up to filebucket notice: /Stage[main]//File[//tmp/test]: Not removing directory; use 'force' to override err: /Stage[main]//File[//tmp/test]/ensure: change from directory to file failed: Could not set 'file on ensure: Is a directory - //tmp/test at /root/puppet-2.7.20/test.pp:12 notice: Finished catalog run in 0.02 seconds err: /File[/var/lib/puppet/rrd]: Could not evaluate: Could not find group puppet err: Could not send report: Got 1 failure(s) while initializing: Could not evaluate: Could not find group puppet </pre> -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
