Comment 3 for bug 700945

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