Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private key and client certificate warning messages on a Masterless Puppet Environment #9248

Open
alisboav opened this issue Jan 31, 2024 · 2 comments
Labels
bug Something isn't working triaged Jira issue has been created for this

Comments

@alisboav
Copy link

alisboav commented Jan 31, 2024

Describe the Bug

On a Masterless Puppet Environment using the last version of puppet-agent, we get two warning messages about the fact that there is no private key or certificate, what is expected in this environment.
The puppet-agent-7.16.0-1.el9.x86_64 is the most recent version that does not show the warning, from version puppet-agent-7.17.0-1.el9.x86_64 the warnings are displayed.
Can you please take a look?

Expected Behavior

No warning messages on a Masterless Puppet Environment.

Steps to Reproduce

It's a bug with the file resource https://www.puppet.com/docs/puppet/5.5/types/file.html

# mkdir -p testing/filebug/manifests
# vi testing/filebug/manifests/init.pp
# cat testing/filebug/manifests/init.pp 
class filebug {

  $test_file = 'https://link.testfile.org/PDF10MB'

  file { '/tmp/test_file':
    ensure  => 'file',
    source  => $test_file,
  }
}
# puppet apply --modulepath=/root/testing -e "include filebug" 
Notice: Compiled catalog for testhost.cern.ch in environment production in 0.01 seconds
Warning: Private key for ‘testhost.cern.ch' does not exist
Warning: Client certificate for ‘testhost.cern.ch' does not exist
Notice: /Stage[main]/Filebug/File[/tmp/test_file]/ensure: defined content as '{mtime}2022-10-08 01:39:09 UTC'
Notice: Applied catalog in 4.88 seconds
# rpm -qa puppet-agent
puppet-agent-7.28.0-1.el9.x86_64

Environment

  • puppet-agent-7.28.0-1.el9.x86_64
  • RHEL8/9 and AlmaLinux8/9
@alisboav alisboav added the bug Something isn't working label Jan 31, 2024
@joshcooper
Copy link
Contributor

joshcooper commented Feb 7, 2024

The agent assumes its private key and client cert are available so that it can use them to establish a mTLS connection to the source. It should be more defensive in case we're running in masterless and don't have a client cert. There's a related but different issue https://puppet.atlassian.net/browse/PUP-11331

@joshcooper joshcooper transferred this issue from puppetlabs/puppet-agent Feb 9, 2024
@cthorn42 cthorn42 added the triaged Jira issue has been created for this label Apr 23, 2024
Copy link

Migrated issue to PUP-12037

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged Jira issue has been created for this
Projects
None yet
Development

No branches or pull requests

3 participants