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

Rhel/Centos 8 versionlock doesn't work #150

Closed
AlexSamad opened this issue Nov 26, 2019 · 7 comments · Fixed by #169
Closed

Rhel/Centos 8 versionlock doesn't work #150

AlexSamad opened this issue Nov 26, 2019 · 7 comments · Fixed by #169

Comments

@AlexSamad
Copy link

Seems like the format of the file has changed in Centos 8

I have to configure like so
yum::versionlock { '1:java-1.8.0-openjdk-headless-1:1.8.0.232.b09-0.el8_0.*':
ensure => present,
}

but the line should be

yum::versionlock { 'java-1.8.0-openjdk-headless-1:1.8.0.232.b09-0.el8_0.*':
ensure => present,
}

But the module balks at that !

@TJM
Copy link

TJM commented Nov 26, 2019

I have noticed that the module is fairly cranky about the formatting, way more cranky than yum itself, even on EL7 :)

@vykulakov
Copy link

The current approach with editing the lock file directly looks not so robust and leads to incorrect behaviour in some cases (at least in my cases). Why doesn't it use a command-line interface of the yum version lock plugin? Like the install command and others. Maybe, it's worth to rewrite this component to use command-line interface as well?

@TJM
Copy link

TJM commented Dec 2, 2019

I think it would be a great idea! A type and provider would allow the plugin to be agnostic to the actual contents of the configuration file. In addition to the "ensure => present" -> add and "ensure => absent" -> delete (and possibly some sort of exclude capability), I would recommend supporting a generic "options" for the various command line flags.

~tommy

PS: I have honestly always thought that the package provider should automatically "versionlock" a package when someone sets a "version" for the ensure parameter, rather than "present" ... I wonder how hard it would be to add that capability?

@vykulakov
Copy link

vykulakov commented Dec 3, 2019

I've checked the approaches with editing the lock file (the current one) and with invoking the yum version lock command directly (the supposed one) and for me, it looks impossible to use the second approach because the approaches lock packages in different ways:

  1. yum can lock only available/installed packages
  2. yum lock only packages that are available at the moment of locking. If we use a template for locking, yum matches all available packets with it and locks matched ones. If we will have a new package in a repository for the template, it won't be locked.

These differences may spoil people's Puppet configuration and lead to unexpected things. So it will be better to not change anything.

@vykulakov
Copy link

@AlexSamad
BTW the plugin does not support CentOS 8 at all. So it is expected that you have some problems with it on CentOS 8 and it would be better to name the issues like "Add CentOS 8 support".

@marszip
Copy link

marszip commented Mar 6, 2020

According to the latest compatible versions on the Puppetforge site RHEL8 should be supported, but this issue is still present. We would like to use this feature so a solution would be much appreciated.

@vchepkov
Copy link

I have encountered it too, python3-dnf-plugin-versionlock changed the format
https://dnf-plugins-core.readthedocs.io/en/latest/versionlock.html

%{NAME}-%{EPOCH}:%{VERSION}-%{RELEASE}.%{ARCH}

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