voxpupuli / puppet-yum

Puppet module for Yum
https://forge.puppet.com/puppet/yum
MIT License
16 stars 101 forks source link

versionlock should trigger `yum clean all` #185

Open TJM opened 4 years ago

TJM commented 4 years ago

Affected Puppet, Ruby, OS and module versions/distributions

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

What are you seeing

Error: Could not update: Execution of '/bin/yum -d 0 -e 0 -y install kubelet-1.15.12' returned 1: Error: Nothing to do
Error: /Stage[main]/Kubernetes::Packages/Package[kubelet]/ensure: change from 'purged' to '1.15.12' failed: Could not update: Execution of '/bin/yum -d 0 -e 0 -y install kubelet-1.15.12' returned 1: Error: Nothing to do

What behaviour did you expect instead

Notice: /Stage[main]/Kubernetes::Packages/Package[kubelet]/ensure: created

Output log

(see above)

Any additional information you'd like to impart

I think any change to yum repos or versionlock should trigger a yum clean all (perhaps optionally?)

psaiz commented 3 years ago

I wonder if this could be achieved setting the

yum::plugin::versionlock::clean: true

Looking at https://github.com/voxpupuli/puppet-yum/blob/master/manifests/plugin/versionlock.pp#L7, if the default was 'true' instead of 'false', it looks like we would get the behavior that Tommy suggests.

TJM commented 3 years ago

oh yea. Why would it default to false? (shrug) Thanks for the pointer.