puppetlabs-toy-chest / puppetlabs-package_updates

Package update discovery Puppet Face and custom Facter fact
12 stars 6 forks source link

Limit to only a certain provider #16

Closed duritong closed 8 years ago

duritong commented 8 years ago

It would be nice if the update-checking could only be limited to a certain provider, e.g. yum, as gem-provider-packages are not interested if they come through system packages anyway.

ccaum commented 8 years ago

Sorry for the late reply. I missed it when it came in. Currently, it's meant that update reports be collected from PuppetDB, but there are some bugs in PuppetDB's query engine that prevent you from asking for updates from specific providers. Assuming that bug is fixed and there'a simple way to query for all updates in an environments for a given list of providers, would that solve your problem?

ccaum commented 8 years ago

I'm going to close this. If the proposed solution is insufficient, please let me know.

slauger commented 8 years ago

@ccaum yes, it's possible to request the package_updates fact from PuppetDB with filtering, but currently there is is no option to generate the facts with "puppet package updates" only for a single package provider (... or exclude one of the available providers). I assume that was the reason for this issue ticket.

I think most people only need the update information for default package provider (e.g. apt/yum/zypper) because, for example, updates for gem packages are managed trough the default package provider (on most systems).

I also see that the fact generation take a very long time just because of the inclusion of the gem provider.

real    1m13.075s
user    0m36.130s
sys     0m2.703s

Such an option for the fact generation (e.g. "puppet package updates --provider yum --render-as json") would also resolve #20 in most situations.

adamwenner commented 7 years ago

@ccaum I agree with @slauger here, if we could limit the providers to a single provider that would be preferable. Currently it silently fails with no output if a single provider fails. For us, we would only want updates from apt/yum, so searching other providers is pointless for our use cases.