misbehaving file resource on only one server

34 views
Skip to first unread message

Gabriel Filion

unread,
Mar 24, 2015, 4:31:21 PM3/24/15
to puppet...@googlegroups.com
Hello,

I'm having issues with one server when it tries to apply a super simple
file resource that ensures a file is absent:

file { '/etc/munin/plugin-conf.d/uptime.conf': ensure => absent }

I can easily replicate this with a puppet apply -e of the above line.

I get the following error:

err: /Stage[main]//File[/etc/munin/plugin-conf.d/uptime.conf]: Could not
evaluate: undefined method `[]=' for :chec:Symbol

The weird thing is that it's the only server where this is happening.
Other servers that are using the same package versions can apply the
same resource without any issue.

I'm using the debian packages from wheezy, so puppet 2.7.23 with ruby 1.9.1

This happens whether I configure ruby 1.9.1 or 1.8.7 as the version to
run with the "ruby" executable.

Has anyone already seen such a problem before? is there any more setup
info that I should verify to find differences between the working
servers and the one that isn't?

--
Gabriel Filion

signature.asc

Christopher Wood

unread,
Mar 24, 2015, 5:03:20 PM3/24/15
to puppet...@googlegroups.com
On Tue, Mar 24, 2015 at 04:30:27PM -0400, Gabriel Filion wrote:
> Hello,
>
> I'm having issues with one server when it tries to apply a super simple
> file resource that ensures a file is absent:
>
> file { '/etc/munin/plugin-conf.d/uptime.conf': ensure => absent }
>
> I can easily replicate this with a puppet apply -e of the above line.
>
> I get the following error:
>
> err: /Stage[main]//File[/etc/munin/plugin-conf.d/uptime.conf]: Could not
> evaluate: undefined method `[]=' for :chec:Symbol
>
> The weird thing is that it's the only server where this is happening.
> Other servers that are using the same package versions can apply the
> same resource without any issue.
>
> I'm using the debian packages from wheezy, so puppet 2.7.23 with ruby 1.9.1

It reminds me vaguely of something I found in wheezy but I may have typo'ed the version number, and you're getting a different error.

https://groups.google.com/forum/#!msg/puppet-users/4rk31Q1IzNY/g8mBTaXrRCIJ

https://projects.puppetlabs.com/issues/14599

https://github.com/puppetlabs/puppet/commit/b572810ed20734eca88358ebdc757674a9af3c00

You might check if the whole directory path exists, and if you get the same error after "mkdir -p /etc/munin/plugin-conf.d/". Failing that, strace'ing might show you something more useful.

I can't replicate using 3.7.2, and there are wheezy-compatible apt repositories available at apt.puppetlabs.com. Food for thought?


> This happens whether I configure ruby 1.9.1 or 1.8.7 as the version to
> run with the "ruby" executable.
>
> Has anyone already seen such a problem before? is there any more setup
> info that I should verify to find differences between the working
> servers and the one that isn't?
>
> --
> Gabriel Filion
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5511C963.9070901%40lelutin.ca.
> For more options, visit https://groups.google.com/d/optout.


Gabriel Filion

unread,
Mar 27, 2015, 12:40:39 AM3/27/15
to puppet...@googlegroups.com
On 24/03/15 05:03 PM, Christopher Wood wrote:
> On Tue, Mar 24, 2015 at 04:30:27PM -0400, Gabriel Filion wrote:
>> I'm having issues with one server when it tries to apply a super simple
>> file resource that ensures a file is absent:
>>
>> file { '/etc/munin/plugin-conf.d/uptime.conf': ensure => absent }
>>
>> I can easily replicate this with a puppet apply -e of the above line.
>>
>> I get the following error:
>>
>> err: /Stage[main]//File[/etc/munin/plugin-conf.d/uptime.conf]: Could not
>> evaluate: undefined method `[]=' for :chec:Symbol
>>
>> The weird thing is that it's the only server where this is happening.
>> Other servers that are using the same package versions can apply the
>> same resource without any issue.
>>
>> I'm using the debian packages from wheezy, so puppet 2.7.23 with ruby 1.9.1
>
> It reminds me vaguely of something I found in wheezy but I may have typo'ed the version number, and you're getting a different error.
>
> https://groups.google.com/forum/#!msg/puppet-users/4rk31Q1IzNY/g8mBTaXrRCIJ
>
> https://projects.puppetlabs.com/issues/14599
>
> https://github.com/puppetlabs/puppet/commit/b572810ed20734eca88358ebdc757674a9af3c00

it doesn't look like what I'm seeing unfortunatly, plus:

> You might check if the whole directory path exists, and if you get the same error after "mkdir -p /etc/munin/plugin-conf.d/".

the path /etc/munin/plugin-conf.d/ already exists and has a bunch files
in it already (all managed by puppet, too).

> Failing that, strace'ing might show you something more useful.

I'll see what I can find with strace...
signature.asc

Gabriel Filion

unread,
Mar 27, 2015, 12:49:24 AM3/27/15
to puppet...@googlegroups.com
On 27/03/15 12:40 AM, Gabriel Filion wrote:
>> Failing that, strace'ing might show you something more useful.
> I'll see what I can find with strace...

unfortunately, nothing really useful..

in the output below, the first file access gives the same error as the
one failing, but seems to work ok:

lstat("/etc/munin/plugin-conf.d/if_err_eth0.conf", 0x7fff125de9c0) = -1
ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 856657}, NULL) = 0
gettimeofday({1427430950, 856828}, NULL) = 0
gettimeofday({1427430950, 856904}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 857379}, NULL) = 0
gettimeofday({1427430950, 857540}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 857827}, NULL) = 0
gettimeofday({1427430950, 857970}, NULL) = 0
lstat("/etc/munin/plugin-conf.d/uptime.conf", 0x7fff125de9c0) = -1
ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 858358}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 858793}, NULL) = 0
gettimeofday({1427430950, 859145}, NULL) = 0
sendto(3, "<27>Mar 27 00:35:50 puppet-agent"..., 191, MSG_NOSIGNAL,
NULL, 0) = 191
write(1, "\33[1;35merr: /Stage[main]/Site_mu"..., 165err:
/Stage[main]/Site_munin/Munin::Plugin[uptime]/File[/etc/munin/plugin-conf.d/uptime.conf]:
Could not
evaluate: undefined method `[]=' for :chec:Symbol) = 165
write(1, "\n", 1
) = 1
gettimeofday({1427430950, 859715}, NULL) = 0
gettimeofday({1427430950, 859788}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 860310}, NULL) = 0
gettimeofday({1427430950, 860568}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 860877}, NULL) = 0
gettimeofday({1427430950, 861091}, NULL) = 0

--
Gabriel Filion

Alex Harvey

unread,
Mar 27, 2015, 1:55:10 AM3/27/15
to puppet...@googlegroups.com, gab...@lelutin.ca
Providing this isn't a production host, I'd use locate to find the file posix.rb (that's your built-in file provider), then insert some puts statements to see if you can find out exactly where in the code it's failing.
Reply all
Reply to author
Forward
0 new messages