Re: [Puppet Users] Re: custom facts sensitive to spaces

2015-09-09 Thread Vince Skahan
On Wednesday, September 9, 2015 at 8:27:42 AM UTC-7, Christopher Wood wrote:

> There's a big "should" question here, maybe the desired behaviour needs to 
> be nailed down before that's a bug? 
>
> For instance, whitespace before/after the "=" could be, according to 
> functionality I've seen: 
>
> a single ascii " " 
> things described by the PCRE \s+ (includes tabs) 
> unicode versions of space characters 
> whatever Word was using for a space character that day 
>
>
I can't think of a case I've ever seen where where "key = value" is 
supposed to be interpreted as anything different than "key=value", but sure 
documenting expected behavior is always goodness.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/91fbc85f-8a75-49e4-b44f-9142d4593ecf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: custom facts sensitive to spaces

2015-09-09 Thread Christopher Wood
On Wed, Sep 09, 2015 at 12:01:54AM -0700, Josh Cooper wrote:

(SNIP)

>I think you're running into
>https://tickets.puppetlabs.com/browse/FACT-1050
>Josh 

There's a big "should" question here, maybe the desired behaviour needs to be 
nailed down before that's a bug?

For instance, whitespace before/after the "=" could be, according to 
functionality I've seen:

a single ascii " "
things described by the PCRE \s+ (includes tabs)
unicode versions of space characters
whatever Word was using for a space character that day

Apart from nailing down how it "should" behave, there's the can of worms that 
troubleshooting whitespace opens. It's way easier to explain how things before 
the '=' are the key, and things after the '=' are the value.

(Editorially, I feel I've served my time troubleshooting allegedly 
insignificant whitespace. Way before I started with puppet though.)

>--
>You received this message because you are subscribed to the Google Groups
>"Puppet Users" group.
>To unsubscribe from this group and stop receiving emails from it, send an
>email to [1]puppet-users+unsubscr...@googlegroups.com.
>To view this discussion on the web visit
>
> [2]https://groups.google.com/d/msgid/puppet-users/377b6326-f854-4a9d-9ea0-f48576098273%40googlegroups.com.
>For more options, visit [3]https://groups.google.com/d/optout.
> 
> References
> 
>Visible links
>1. mailto:puppet-users+unsubscr...@googlegroups.com
>2. 
> https://groups.google.com/d/msgid/puppet-users/377b6326-f854-4a9d-9ea0-f48576098273%40googlegroups.com?utm_medium=email&utm_source=footer
>3. https://groups.google.com/d/optout

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/20150909152720.GA23757%40iniquitous.heresiarch.ca.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: custom facts sensitive to spaces

2015-09-09 Thread Vince Skahan
On Wednesday, September 9, 2015 at 12:01:54 AM UTC-7, Josh Cooper wrote:

> I think you're running into 
> https://tickets.puppetlabs.com/browse/FACT-1050 
> 
>
>
>
Looks like the same thing to me.
It should left+right strip spaces around the '=' sign in all cases.

I did notice that 'facter' with no arguments does show the spaces, you just 
need a font that lets you notice it's there.
Again, I ran into it on 3.8.2

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/27ebb44f-3c6b-4e38-aa20-d79b099595fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: custom facts sensitive to spaces

2015-09-09 Thread Josh Cooper


On Tuesday, September 8, 2015 at 11:47:44 AM UTC-7, Vince Skahan wrote:
>
> I think I found a bug in facter in 3.8.2 but wanted to ask here before 
> opening a PL ticket.
>
> Basic description is that facter has different behaviors if you run it 
> without vs. with a fact specified.
>
> To recreate:
>
> # echo 'foo = bar' > /etc/facter/facts.d/foo.txt
> # facter | grep foo
> foo  =>  bar
> # facter foo
>
> #
>
> Net effect is that if you have spaces around the = sign in your custom 
> fact definitions, the server doesn't match at all.  It seems to look up by 
> name, which returns nothing (or a blank line, or a space - it's hard to 
> tell which)
>
> Workaround is to have no spaces around the = sign, but I think this is a 
> bug needing fixing.  The behavior should be the same when you run "facter | 
> grep foo" and "facter foo" shouldn't it ?
>
>
I think you're running into https://tickets.puppetlabs.com/browse/FACT-1050

Josh 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/377b6326-f854-4a9d-9ea0-f48576098273%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.