waveclaw / puppet-subscription_manager

Handle Client Registration to RedHat Satellite 6 or Katello
https://rhn.redhat.com
Other
6 stars 34 forks source link

rhsm_repo resource doesn't use the cache files. #89

Closed cornell80 closed 4 years ago

cornell80 commented 4 years ago

Our organisation use this module to manage the repo's from Satellite 6 (+/-2500 systems) with the "rhsm_repo" resource.
But with every puppet run the rhsm_repo execute "subscription-manager repos" which in turn does a call to the Satellite server.

Debug: Prefetching subscription_manager resources for rhsm_repo
Debug: Executing: '/sbin/subscription-manager repos'

This generate a load of trafic and cpu time on the Satellite server.
Is there a reason why the rhsm_repo resource doesn't use the cache files (if available) in /var/cache/rhsm ?

waveclaw commented 4 years ago

This module does use /var/cache/rhsm. The module abstracts the subscription-manager command. If this command on your systems is not using the cache for the repos command but refreshing every time then this module will refresh every time.