backport of patch for error message undefined method `closed?' for Nil:NilClass required.

Bug #700945 reported by Anand Kumria
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
puppet
Fix Released
Undecided
Unassigned
puppet (Ubuntu)
Fix Released
Low
Unassigned
Lucid
Fix Released
Low
Unassigned

Bug Description

Binary package hint: puppet

Hi,

There are many versions of puppet, fortunately lucid (10.04) has a relatively new version (merely called legacy from puppetlabs).

Unfortunately it has a number of bugs / issues, one of which I have recently encountered is an underlying bug in Ruby (and OpenSSL) on Lucid.

However, the bug can be easily worked around, as noted two months after lucid's release.

http://<email address hidden>/2010-06/msg00206.html

Basically, upgrading to the latest available version of puppet in the 'legacy' series will resolve the issue.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Anand, thanks for taking the time to file this bug report and help us make Ubuntu better.

Rather than bring in all of the patches from 0.25.5, its generally preferable to cherry pick patches for issues that are worthy of doing a Stable Release Update (SRU).

Annoying error messages may not be worth the trouble for an SRU, even though I do see that the patch is minimal and would not introduce a high potential for regression.

Anyway, I was just able to confirm it using the test case from puppet issue #3101. So marking Triaged, importance Low. Tagging 'bitesize' as the only step necessary is to add this patch to the package and follow the SRU process.

Nominating for Lucid as well.

Changed in puppet (Ubuntu):
status: New → Triaged
importance: Undecided → Low
summary: - puppet 0.25.5 backport required
+ backport of patch for error message undefined method `closed?' for
+ Nil:NilClass required.
tags: added: bitesize lucid
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Linking to the upstream bugtracker doesn't seem to be working. Adding bug watch here:

http://projects.puppetlabs.com/issues/3101

Changed in puppet (Ubuntu Lucid):
status: New → Triaged
importance: Undecided → Low
Dave Walker (davewalker)
Changed in puppet:
status: New → Fix Released
Revision history for this message
Oliver Brakmann (obrakmann) wrote :

Nominating for SRU, fulfills: (1) have an obviously safe patch and (2) affect an application rather than critical infrastructure packages.

Justification: The bug hides error messages, which makes diagnosing connection problems to a puppetmaster a real PITA.

The fix is from upstream (Maverick's puppet package has a newer version which already contains the fix): http://projects.puppetlabs.com/projects/puppet/repository/revisions/ae0b0bf23e418e8c6665e9dc135148b78bdbd913

Regression potential: none.

TEST CASE:
(these instructions assume an already working puppet installation)

1) On a puppet client computer, stop the puppet service

2) Add a new line to your /etc/hosts file, containing an entry for the IP address of your puppetmaster, but with a wrong hostname, eg. like this:

1.2.3.4 foo.local

3) Add this line to your puppet client's /etc/puppet/puppet.conf file:
server=foo.local

4) Run "puppetd --test" on the client

Wrong output:
info: Retrieving plugin
err: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': undefined method `closed?' for nil:NilClass
err: /File[/var/lib/puppet/lib]: Failed to retrieve current state of resource: undefined method `closed?' for nil:NilClass Could not retrieve file metadata for puppet://foo.local/plugins: undefined method `closed?' for nil:NilClass
err: Could not retrieve catalog from remote server: undefined method `closed?' for nil:NilClass
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

Expected output:
info: Retrieving plugin
err: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': hostname was not match with the server certificate
err: /File[/var/lib/puppet/lib]: Failed to retrieve current state of resource: hostname was not match with the server certificate Could not retrieve file metadata for puppet://foo.local/plugins: hostname was not match with the server certificate
err: Could not retrieve catalog from remote server: hostname was not match with the server certificate
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

tags: added: patch
Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Oliver, thanks for posting a fix to this bug.

Since it sounds like this issue exists only for Lucid, not natty, I'm closing the general task for natty, and leaving the Lucid task open for further work.

The debdiff applies, but I think you should use a patch system like quilt rather than patch the sources directly...

Changed in puppet (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Oliver Brakmann (obrakmann) wrote :

Hi Bryce,

I was thinking along those lines, until I saw that the original package patches the source also. Since I did not want to bloat the patch unnecessarily, I went with patching the source as well instead of converting the source package to a quilt-based one.

Thanks, Oliver

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Oliver, +1 for that, we don't want to be introducing patch systems in an SRU

I've uploaded this to lucid-proposed, so unsubscribing ubuntu-sponsors.

I'll let pitti review it for acceptance into lucid-proposed.

Thanks for the patch Oliver!

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted puppet into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in puppet (Ubuntu Lucid):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Oliver Brakmann (obrakmann) wrote :

Hi,

I successfully verified that the new package passes the test case.

Thanks!

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Oliver thats great!

We usually try to get some third party who did not develop the fix to verify the proposed packages before marking it as "verification done".

Anand, are you still affected by the original problem, and if so, would you be willing to try out the package from lucid-proposed?

Revision history for this message
Anand Kumria (wildfire) wrote : Re: [Bug 700945] Re: backport of patch for error message undefined method `closed?' for Nil:NilClass required.

Hi guys,

I am very happy to confirm that this worked great.

First it was gave me an indication that the remote server was not
responding (as per
http://bitcube.co.uk/content/puppet-errors-explained) and then it
correclt diagnosed a mismatched server identity.

Thanks for getting this fix in.

Regards,
Anand

On 16 April 2011 20:38, Clint Byrum <email address hidden> wrote:
> Oliver thats great!
>
> We usually try to get some third party who did not develop the fix to
> verify the proposed packages before marking it as "verification done".
>
> Anand, are you still affected by the original problem, and if so, would
> you be willing to try out the package from lucid-proposed?
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/700945
>
> Title:
>  backport of patch for error message undefined method `closed?' for
>  Nil:NilClass required.
>
> Status in puppet:
>  Fix Released
> Status in “puppet” package in Ubuntu:
>  Fix Released
> Status in “puppet” source package in Lucid:
>  Fix Committed
>
> Bug description:
>  Binary package hint: puppet
>
>
>  Hi,
>
>  There are many versions of puppet, fortunately lucid (10.04) has a
>  relatively new version (merely called legacy from puppetlabs).
>
>  Unfortunately it has a number of bugs / issues, one of which I have
>  recently encountered is an underlying bug in Ruby (and OpenSSL) on
>  Lucid.
>
>  However, the bug can be easily worked around, as noted two months
>  after lucid's release.
>
>  http://www.mailinglistarchive.com/html/puppet-
>  <email address hidden>/2010-06/msg00206.html
>
>  Basically, upgrading to the latest available version of puppet in the
>  'legacy' series will resolve the issue.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/puppet/+bug/700945/+subscribe
>
>

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package puppet - 0.25.4-2ubuntu6.1

---------------
puppet (0.25.4-2ubuntu6.1) lucid-proposed; urgency=low

  * Work around a bug in Ruby that causes meaningful error messages to be
    hidden by a ruby error message (cf.
    http://projects.puppetlabs.com/issues/3101). Fixes LP: #700945.
 -- Oliver Brakmann <email address hidden> Tue, 05 Apr 2011 11:16:02 -0700

Changed in puppet (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.