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

Module keeps subscribing server even though it's not necessary. #119

Open
bschonec opened this issue Oct 28, 2022 · 2 comments
Open

Module keeps subscribing server even though it's not necessary. #119

bschonec opened this issue Oct 28, 2022 · 2 comments
Assignees
Labels
Milestone

Comments

@bschonec
Copy link

The module is successfully subscribing the server but it keeps giving a notice:

Notice: /Stage[main]/Subscription_manager::Config/Rhsm_register[subscription.rhn.redhat.com]/ensure: created (corrective)

I'm sure it's happening in ruby somewhere but I have zero skills when it comes to ruby debugging.

[root@db-07d seed]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.6 (Ootpa)
[root@db-07d seed]# puppet --version
7.20.0
[root@db-07d seed]# 
@bschonec
Copy link
Author

My rhsm_ca_name is empty which is probably causing this code to keep running. Any idea why rhsm_ca_name would be empty?

@waveclaw
Copy link
Owner

waveclaw commented Jan 3, 2023

rhsm_ca_name is calculated in the /lib/facter/rhsm_ca_name.rb

if File.exist?('/etc/rhsm/ca/katello-default-ca.pem')
  # Katello or Satellite with custom CA cert
...
elsif File.exist?('/etc/rhsm/ca/katello-server-ca.pem')
  # Katello or Satellite
...
elsif File.exist?('/etc/rhsm/ca/candlepin-local.pem')
  # RedHat SAM
...

If none of these exist, are empty, are corrupt or are not read-able by the user puppet runs as then it could be blank.

On RHEL 8 it should still be the katello-server-ca.pem. But with the newer releases of subscription-manager? One always needs to check. The files are internal to Candlepin which would use the regular libraries instead of directly seeking and parsing the SSL files on disk with openssl libraries.

@waveclaw waveclaw self-assigned this Jan 3, 2023
@waveclaw waveclaw added the bug label Jan 3, 2023
@waveclaw waveclaw added this to the 5.0.0 milestone Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants