-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
In the interest of helping people who may be doing something like this
in the future....
I stepped through the code with ruby-debug and found that it is blowing
up validly in munge.pp:should_to_s which only expects to see an Integer
or a Symbol.
When I allowed it to see a string, something else blew up. I'll see if
I can trace further on that later.
The original code did base its decision on the existing mode of the file
but the following was communicated to me:
- munge should not expect to have all of its activity done on the
client system.
- insync? and sync should be used to properly check against the
converted value and only sync should modify the result.
Thanks,
Trevor
On 01/14/2010 09:29 PM, Trevor Vaughan wrote:
> Ok, I started doing the suggested code changes, but didn't get very far.
>
> When munge returns something other than an integer, something somewhere
> blows up and I can't tell what or why.
>
> sync and insync? don't appear to be activated at all.
>
> The trace is attached from running the following:
>
> puppet --test --trace test.pp
>
> test.pp contains:
>
> file { "/tmp/foo":
> ensure => 'file',
> mode => 'o=u,o-w',
> content => 'foo'
> }
>
> The mode string is being returned by munge.
>
> Any clues would be appreciated.
>
> Also, I'm not going to try to refactor the munge method. It seems fine
> to me (but that's probably why I'm not a full time Ruby programmer) so
> I'm not really sure what you're looking for.
>
> Trevor
>
<snip/>
- --
Trevor Vaughan
Vice President, Onyx Point, Inc.
email: [email protected]
phone: 410-541-ONYX (6699)
- -- This account not approved for unencrypted sensitive information --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAktQSdoACgkQyWMIJmxwHpS3yQCdE1p6lz/BYUmMzoswFMwdR/WD
HkkAoJbWMQz+3XOazw+gDDS4Y+dRaJID
=rtIU
-----END PGP SIGNATURE-----
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" 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-dev?hl=en.