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

Misleading/unnecessary warning on pe-puppetserver startup #48

Open
bastelfreak opened this issue Jul 28, 2024 · 0 comments
Open

Misleading/unnecessary warning on pe-puppetserver startup #48

bastelfreak opened this issue Jul 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bastelfreak
Copy link

Describe the Bug

On PE 2019, PE 2021 and probably PE2023 we get the following warning when code-manager is active but no r10k private key is set:

2024-07-28T13:54:42.124Z WARN  [async-dispatch-2] [p.c.config] No default private key provided. Code Manager will not be able to access most git repositories over ssh. Please set 'puppetlabs.code-manager.git.private-key'
2024-07-28T13:54:42.125Z WARN  [async-dispatch-2] [p.c.config] No default private key provided. Code Manager will not be able to access most git repositories over ssh. Please set 'puppetlabs.code-manager.git.private-key'

This is a bit misleading when you've only http(s) control repositories configured. In that case the private key isn't required at all. The warning is problematic because multiple customers analyse their logfiles and they match on ERR and WARN.

Expected Behavior

Above log message should only happend when:

  • code manager is enabled
  • a repository is configured that's used via ssh
  • no private key is is configured

As an alternative, only support ssh access when a private key is set.

Steps to Reproduce

set

"puppet_enterprise::profile::master::code_manager_auto_configure": true,
"puppet_enterprise::profile::master::r10k_remote": "https://github.com/bastelfreak/testcontrolrepo",

run puppet agent -t
restart pe-puppetserver

Environment

  • PE 2019.8.12
  • PE 2021.7.8

Additional Context

I would have submitted a patch but the PE license prohibits sharing patches, the repo is private and #10 isn't resolved yet.

@bastelfreak bastelfreak added the bug Something isn't working label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant