Issue #8311 has been updated by tgeeky -.

Now, a pastie with the replacement:

s/decimal/squote/

s/(\d*)/'(\d*)/

[[pastie]](http://pastie.org/2181120)
----------------------------------------
Bug #8311: file { mode => .. }  -- investigation into strings, octal, etc --
https://projects.puppetlabs.com/issues/8311

Author: tgeeky -
Status: Investigating
Priority: Normal
Assignee: tgeeky -
Category: file
Target version: 2.7.x
Affected Puppet version: 2.7.1
Keywords: file, mode, octal
Branch: 


This ticket is meant as an investigation into general problems with the 
following syntax:

    file { '/some/file/or/directory':
           mode => _____
    }

In theory, any of the following could be entered where ____ is:

* 0
* 1
* 000000000
* 0123
* 1365
* '0'
* '0000'
* '0777'
* "0"
* "0123"
* "644"
* "- - - - - - - - - -"
* "- r w S r w S r w -"
* "8000"
* "81ff"

For instance, what should be valid here? How should puppet store (internally) 
the information you supply? What should happen when invalid input is supplied? 
Because Ruby is a dynamically typed language ****and**** because some joker 
decided that prefixing a number with a zero specifies an octal number, Puppet 
is left with some lingering bugs; and, even when a decision on syntax 
****is**** made, backwards compatibility is not an easy task.


This bug report was spurred on by (but ****is not**** identical to) my other 
[[bug report#8255]](http://projects.puppetlabs.com/issues/8255). That bug is 
just for the defaults (which is a puppet system also need of some TLC).


[[This pastie]](http://pastie.org/2181013) represents my first attack at 
actually figuring out what's going on. It is nowhere near sufficient, and it's 
not in test form (since I don't know how to write tests yet).

There are probably several bugs that are caused by this inconsistency. And 
directories are not immune, either.


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