In this case, it was a custom function that was tripping things up.

Looking through the code, I *think* this was the scenario:

1) Fact => trusted['certname']
2) Function call to parse_host($trusted['certname'])
3) Parse host:

host = args.first
host.strip! # Here's the offender

I also tried seeing if dup'ing the args would work, but it copies the
frozen attribute with the String object (which makes sense).

So, I don't know if I was trying to modify something from a Fact or if the
object just happened to be carrying the 'frozen' status as it went along.

Thanks,

Trevor

On Wed, Jul 15, 2015 at 12:21 PM, R.I.Pienaar <r...@devco.net> wrote:

>
>
> ----- Original Message -----
> > From: "Peter Huene" <peter.hu...@puppetlabs.com>
> > To: "puppet-dev" <puppet-dev@googlegroups.com>
> > Sent: Wednesday, July 15, 2015 5:18:29 PM
> > Subject: Re: [Puppet-dev] How do you know what variables are frozen?
>
> > On Wed, Jul 15, 2015 at 8:59 AM, Trevor Vaughan <tvaug...@onyxpoint.com>
> > wrote:
> >
> >> I *think* I've just run into a case where I was trying to run strip! on
> a
> >> frozen Facter variable.
> >>
> >> 1) How do we know what variables are frozen coming from Facter?
> >>
> >
> > Facter shouldn't be freezing resolved fact values, so is this something
> > that a custom fact is explicitly doing to the returned value?
> >
> > http://ruby-doc.org/core-2.2.2/Object.html#method-i-frozen-3F should
> work
> > for checking in an object is frozen, though.
> >
>
> but surely you should just assume you cant change variables especially
> facts?
> since that's their intended use, no modifying of variables?
>
> Be interesting to hear why a fact is being tripped in a destructive way :)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-dev/142575421.181465.1436977300356.JavaMail.zimbra%40devco.net
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699

-- This account not approved for unencrypted proprietary information --

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoVQqDJQ9usNe7gPbWzEddxTq2osf-PYkT%2Bx%3DxWvajB%3D1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to