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

Read facts from /etc/yum.repos.d/redhat.repo instead of subscription-manager #90

Closed
kallies opened this issue Apr 15, 2019 · 0 comments · Fixed by #95
Closed

Read facts from /etc/yum.repos.d/redhat.repo instead of subscription-manager #90

kallies opened this issue Apr 15, 2019 · 0 comments · Fixed by #95

Comments

@kallies
Copy link
Contributor

kallies commented Apr 15, 2019

As stated by @alexjfisher in #53 subscription-manager might lead to long puppet runs and - in case RHSM/Satellite 6 is down - might lead to issues when relying on the resulting facts:

If the Satellite server (or RHSM) is not accessible or sends http errorcodes.

  1. Not accessible: Puppet runs are stale until subscription-manager times out (default timeout is 180s per http request and subscription-manager repos --list-enabled triggers ~7 requests)
  2. Satellite/RHSM frontend answers with http errorcode: fact returns empty array -> if someone (like we do) evaluates this fact to enable repos, Puppet tries to enable all repos (again - not a big issue but def. not a nice behaviour).

We were thinking about a caching mechanism which addresses these two issues.

Instead of calling subscription-manager or yum the file /etc/yum.repos.d/redhat.repo should be evaluated

".. or search for enabled = 1 and all sections without enabled

This should also address both issues.

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: >=4
  • Ruby: generic
  • Distribution: RHEL
  • Module version: 3.2.1-rc0/master

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

As described in README.md

What are you seeing

Slow puppet runs (>10s for subscription-manager), issues when Satellite 6 is not available or - even worse - partially available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant