Issue #3083 has been updated by James Turnbull.

Status changed from Accepted to Closed

Fixes issue for me also + Jesse.

Pushing in commit:"ae0b0bf23e418e8c6665e9dc135148b78bdbd913" in branch 0.25.x
----------------------------------------
Bug #3083: Failed to retrieve current state of resource: undefined method 
`closed?' for nil:NilClass
http://projects.puppetlabs.com/issues/3083

Author: Alexey Degtyarev
Status: Closed
Priority: High
Assigned to: Markus Roberts
Category: 
Target version: 0.25.5
Affected version: 0.25.4rc1
Keywords: undefined method `closed?' for nil:NilClass, 
Could not retrieve file metadata
Branch: http://github.com/MarkusQ/puppet/tree/ticket/0.25.x/3083


After upgrade from 0.24.8 to 0.25.x clients begun to log error:

<pre>
Failed to retrieve current state of resource: undefined method `closed?' for 
nil:NilClass Could not retrieve file metadata for 
puppet:///aliases/default/aliases: undefined method `closed?' for nil:NilClass 
at /usr/local/etc/puppet/modules/aliases/manifests/init.pp:18
</pre>

The error appears only on resources having sourced with multiple destinations 
(line counters preserved):

  8 class aliases {
  9 
 10         file { "/etc/mail/aliases":
 11                 ensure  => file,
 12                 notify  => Exec["newaliases"],
 13                 owner   => "root",
 14                 group   => "mail",
 15                 mode    => 0440,
 16                 source  => [ "puppet:///aliases/${fqdn}/aliases",
 17                                 "puppet:///aliases/default/aliases" ];
 18         }
 19 
 20         exec { "newaliases":
 21                 require         => File["/etc/mail/aliases"],
 22                 refreshonly     => true,
 23                 command         => "/usr/bin/newaliases";
 24         }
 25 }

Those errors appears randomly through all classes with similar resources within 
node definition:

The client log:

<pre>
Jan 17 14:11:30 net-mgmt-1 puppetd[80881]: Starting Puppet client version 0.25.2
Jan 17 14:11:46 net-mgmt-1 puppetd[80881]: Finished catalog run in 9.70 seconds
Jan 17 14:12:58 net-mgmt-1 puppetd[80881]: Finished catalog run in 10.35 seconds
Jan 17 14:14:10 net-mgmt-1 puppetd[80881]: Finished catalog run in 10.50 seconds
Jan 17 14:15:12 net-mgmt-1 puppetd[80881]: (//sysctl/File[/etc/sysctl.conf]) 
Failed to retrieve current state of resource: undefined method `closed?' for 
nil:NilClass Could not retrieve file metadata for 
puppet:///sysctl/default/sysctl.conf: undefined method `closed?' for 
nil:NilClass at /usr/local/etc/puppet/modules/sysctl/manifests/init.pp:17
Jan 17 14:15:12 net-mgmt-1 puppetd[80881]: (//sysctl/Exec[sysctl apply]) 
Dependency file[/etc/sysctl.conf] has 1 failures
Jan 17 14:15:12 net-mgmt-1 puppetd[80881]: (//sysctl/Exec[sysctl apply]) 
Skipping because of failed dependencies
Jan 17 14:15:22 net-mgmt-1 puppetd[80881]: Finished catalog run in 10.33 seconds
Jan 17 14:16:26 net-mgmt-1 puppetd[80881]: 
(//ntpdate/File[/etc/rc.conf.d/ntpdate]) Failed to retrieve current state of 
resource: undefined method `closed?' for nil:NilClass Could not retrieve file 
metadata for puppet:///ntpdate/default/ntpdate.rc: undefined method `closed?' 
for nil:NilClass at /usr/local/etc/puppet/modules/ntpdate/manifests/init.pp:16
Jan 17 14:16:34 net-mgmt-1 puppetd[80881]: Finished catalog run in 10.39 seconds

</pre>

The master node log:

<pre>
Jan 17 14:11:35 puppet-1 puppetmasterd[79612]: Compiled catalog for 
net-mgmt-1.renatasystems.org in 0.19 seconds
Jan 17 14:12:46 puppet-1 puppetmasterd[79612]: Compiled catalog for 
net-mgmt-1.renatasystems.org in 0.15 seconds
Jan 17 14:13:58 puppet-1 puppetmasterd[79612]: Compiled catalog for 
net-mgmt-1.renatasystems.org in 0.19 seconds
Jan 17 14:15:11 puppet-1 puppetmasterd[79612]: Compiled catalog for 
net-mgmt-1.renatasystems.org in 0.19 seconds
Jan 17 14:16:23 puppet-1 puppetmasterd[79612]: Compiled catalog for 
net-mgmt-1.renatasystems.org in 0.14 seconds
Jan 17 14:17:35 puppet-1 puppetmasterd[79612]: Compiled catalog for 
net-mgmt-1.renatasystems.org in 0.19 seconds

</pre>
As it can seen - sometimes catalog finished without errors, sometimes it fails 
on sysctl module, sometimes not but fails on another ("ntpdate") module and so 
on.. The tracebacks from client and master nodes attached.

I've tried up to 0.25.4rc1 versions on both master and client nodes, no effect, 
the same error exists.


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