Jira (PUP-11402) puppet lookup --explain fails out of the box starting with 7.13.1

26 views
Skip to first unread message

Trevor Vaughan (Jira)

unread,
Dec 29, 2021, 4:25:02 PM12/29/21
to puppe...@googlegroups.com
Trevor Vaughan updated an issue
 
Puppet / Bug PUP-11402
puppet lookup --explain fails out of the box starting with 7.13.1
Change By: Trevor Vaughan
Method Found: Needs Assessment Customer Feedback
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Trevor Vaughan (Jira)

unread,
Dec 29, 2021, 4:25:05 PM12/29/21
to puppe...@googlegroups.com
Trevor Vaughan created an issue
Issue Type: Bug Bug
Affects Versions: PUP 7.13.1
Assignee: Unassigned
Components: Hiera & Lookup
Created: 2021/12/29 1:24 PM
Priority: Major Major
Reporter: Trevor Vaughan

Starting with Puppet 7.13.1 (as installed via YUM for EL7) `puppet lookup --explain` now fails.

 puppet lookup --explain test
Error: Failed to initialize SSL: The CA certificates are missing from '/etc/puppetlabs/puppet/ssl/certs/ca.pem'
Error: Run `puppet agent -t`
Error: Connection to https://puppet:8140/puppet-ca/v1 failed, trying next route: Request to https://puppet:8140/puppet-ca/v1 failed after 0.001 seconds: The CA certificates are missing from '/etc/puppetlabs/puppet/ssl/certs/ca.pem'
Wrapped exception:
The CA certificates are missing from '/etc/puppetlabs/puppet/ssl/certs/ca.pem'
Error: Could not run: No more routes to ca

7.12.1 and prior do not have this issue.

Nate McCurdy (Jira)

unread,
Dec 31, 2021, 2:31:03 PM12/31/21
to puppe...@googlegroups.com
Nate McCurdy commented on Bug PUP-11402
 
Re: puppet lookup --explain fails out of the box starting with 7.13.1

I did a bit of digging into recent changes since 7.12.1, and I found that this change https://github.com/puppetlabs/puppet/pull/8789 from PUP-8094 is most likely related.
That change was part of the unreleased 7.13.0 tag.

That change, which switches to using trusted information from the agent's cert when getting the node object for puppet lookup, creates a connection to the configured CA server to fetch the agent's cert. It's that connection that ultimately leads to the error in this ticket.

      service = Puppet.runtime[:http]
      session = service.create_session
      cert = session.route_to(:ca)           # <== This is where the error originates from. 
 
      cert = cert.get_certificate(node)
      trusted = Puppet::Context::TrustedInformation.new(true, node, cert)

That patch looks like it assumes the user will always want to fetch trusted information from the agent's cert on the CA server. That the patch also adds a certificate setup step to the acceptance tests also implies that.

I think that assumption can't be made though since there are legitimate reasons to run puppet lookup without having an agent<->server relationship or trusted information (e.g. debugging local code deploys for a puppet apply workflow with puppet lookup).

Josh Cooper (Jira)

unread,
Jan 4, 2022, 11:19:04 AM1/4/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Fix Version/s: PUP 7.14.0
Fix Version/s: PUP 6.26.0

Josh Cooper (Jira)

unread,
Jan 5, 2022, 5:30:03 PM1/5/22
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Jan 6, 2022, 3:55:02 AM1/6/22
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Jan 6, 2022, 3:55:02 AM1/6/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jan 10, 2022, 8:54:03 PM1/10/22
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11402
 
Re: puppet lookup --explain fails out of the box starting with 7.13.1

Passed CI in d90aaec90ca83d9846484bde5cd98f6d138b350e

Josh Cooper (Jira)

unread,
Jan 12, 2022, 3:24:02 PM1/12/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Release Notes: Bug Fix
Release Notes Summary: Restores the ability to run puppet lookup when the agent does not have certificates available locally.

Heston Hoffman (Jira)

unread,
Jan 20, 2022, 4:45:02 PM1/20/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Feb 23, 2022, 12:02:01 AM2/23/22
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages