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

versionlock should trigger yum clean all #185

Open
TJM opened this issue Jul 9, 2020 · 2 comments
Open

versionlock should trigger yum clean all #185

TJM opened this issue Jul 9, 2020 · 2 comments

Comments

@TJM
Copy link

TJM commented Jul 9, 2020

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.18
  • Ruby: ruby 2.4.9p362 (2019-10-02 revision 67824) [x86_64-linux]
  • Distribution: CentOS 7.8
  • Module version: 3f35c56

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

  • Install a specific version of a package with versionlock enabled
  • Update version (and versionlock)
  • Install fails until you yum clean all

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
Copy link

psaiz commented Oct 5, 2020

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
Copy link
Author

TJM commented Oct 5, 2020

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

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

No branches or pull requests

2 participants