Issue #10857 has been updated by Josh Cooper. Category set to file Status changed from Unreviewed to Accepted Target version set to 2.6.x Affected Puppet version changed from 2.6.12 to 2.6.0
Prior to 2.6.0, '/' could be specified as the path for a managed file. In commit:7c6b8836453b2b1e8679923f98854be3b0022edd (released in 2.6.0rc1) for #1621 composite namevars, we added the ability to specify title_patterns. For the file type, it's title pattern was: <pre> /^(.*?)\/?$/ </pre> which is trying to capture everything before the last optional '/', but capturing nothing, causing the path to be set to '' <pre> '/'.match(/^(.*?)\/?$/) => #<MatchData "/" 1:""> </pre> The title logic was later changed to allow multiline titles, #4233 in commit:cf597d72dca288011cfa3e57451b8eba56ea51da but this has the same issue: <pre> '/'.match(/^(.*?)\/*\Z/m) => #<MatchData "/" 1:""> </pre> ---------------------------------------- Bug #10857: File resource fails for root(/) directory. https://projects.puppetlabs.com/issues/10857 Author: Jason Smith Status: Accepted Priority: Normal Assignee: Category: file Target version: 2.6.x Affected Puppet version: 2.6.0 Keywords: Branch: I know this is probably an extreme edge case, but I recently noticed that this fails: file { '/': ensure => directory } with the error: Parameter path failed: File paths must be fully qualified, not '' at /tmp/test.pp:1 A little background, This comes from a larger module that I have which uses the lvm module to create additional or grow existing filesystems on a server. The file resource is used to make sure the mount point exists before using the mount resource to manage /etc/fstab and mount the filesystem. I noticed that if I tried to use my custom module to grow the root(/) filesystem that I got the error above. Is the / being removed to make it an empty path as a result of some code to try and remove trailing slashes from paths? -- 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.
