Skip to content

Server error 500 after upgrade of Puppet Enterprise 2023.5 to 2023.7 #108

Open
@xf7803

Description

@xf7803

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 8.6.0-1 (agent) 2023.7 (Puppet Enterprise)
  • Ruby: 1:3.0~exp1
  • Distribution: Ubuntu 22.04
  • Module version: 1.1.0

How to reproduce (e.g Puppet code you use)

Everything was working fine with PE 2023.5, but I not have the error after upgrading to PE 2023.7

What are you seeing

When I run puppet on a node, I get the following error
puppet agent -t
Info: Refreshing CA certificate
Info: CA certificate is unmodified, using existing CA certificate
Info: Refreshing CRL
Info: CRL is unmodified, using existing CRL
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Notice: Requesting catalog from xxxxxxxx
Notice: Catalog compiled by xxxxxxxx
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Error executing http request (file: /etc/puppetlabs/code/environments/production/modules/active_directory/manifests/init.pp, line: 16, column: 20) on node xxxxxxxx
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

The error happens on the following code line:
$join_password = vault_lookup::lookup('xxxxxxxx', {
'vault_addr' => lookup('vault_lookup::vault_addr'),
'auth_method' => lookup('vault_lookup::auth_method'),
'approle_path_segment' => 'v1/auth/approle/',
'role_id' => lookup('vault_lookup::role_id'),
'secret_id' => lookup('vault_lookup::secret_id'),
'field' => $join_username,
}).unwrap

What behaviour did you expect instead

That the lookup works fine and the execution keep going.

Output log

In pupperserver.log:
2024-07-22T13:06:22.945-04:00 ERROR [qtp2024096493-50090] [puppetserver] Puppet Evaluation Error: Error while evaluating a Function Call, Error executing http request (file: /etc/puppetlabs/code/environments/production/modules/active_directory/manifests/init.pp, line: 16, column: 20) on node xxxxxxxx
2024-07-22T13:06:22.946-04:00 ERROR [qtp2024096493-50090] [puppetserver] Puppet Server Error: Evaluation Error: Error while evaluating a Function Call, Error executing http request (file: /etc/puppetlabs/code/environments/production/modules/active_directory/manifests/init.pp, line: 16, column: 20) on node xxxxxxxx
uri:classloader:/puppetserver-lib/puppet/server/http_client.rb:207:in client_post' uri:classloader:/puppetserver-lib/puppet/server/http_client.rb:79:in post'
/etc/puppetlabs/code/environments/production/modules/vault_lookup/lib/puppet_x/vault_lookup/lookup.rb:165:in get_token' /etc/puppetlabs/code/environments/production/modules/vault_lookup/lib/puppet_x/vault_lookup/lookup.rb:160:in get_approle_auth_token'
/etc/puppetlabs/code/environments/production/modules/vault_lookup/lib/puppet_x/vault_lookup/lookup.rb:70:in lookup' /etc/puppetlabs/code/environments/production/modules/vault_lookup/lib/puppet/functions/vault_lookup/lookup.rb:42:in lookup_opts_hash'

Any additional information you'd like to impart

I verified that the server communicates well on the port (no firewall blocking) and that the approle is working correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions