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

Support yum priorities #4

Closed
skpy opened this issue Nov 19, 2014 · 3 comments
Closed

Support yum priorities #4

skpy opened this issue Nov 19, 2014 · 3 comments

Comments

@skpy
Copy link
Contributor

skpy commented Nov 19, 2014

With Red Hat now shipping Gluster in the official RHEL channels, there can be version problems when using the upstream Gluster repos.

One suggested fix is to use yum priorities.

We can easily add a priority element to the yumrepo resource, but this raises some interesting questions:

Should we install the yum-plugins-priorities package if a priority is defined?
I'm leaning toward 'yes'.

Should we expose a new repo_version parameter?
I have working code not yet committed that will parse the full package version (X.Y.X-1.el6) to create the appropriate yumrepo resource, but such a version hard-codes the RHEL major release, which makes a single Hiera definition for Gluster version hard for environments running both RHEL6 and RHEL7.

A version of '3.5.2' will work for the repo creation, but will fail to actually install any packages:

Error: Could not update: Failed to update to version 3.5.2, got version 3.5.2-1.el6 instead
Error: /Stage[main]/Gluster::Install/Package[glusterfs-fuse]/ensure: change from absent to 3.5.2 failed: Could not update: Failed to update to version 3.5.2, got version 3.5.2-1.el6 instead

We could keep the current implementation whereby the declaration of the repo controls the version that will be applied. This does seem to work as expected with priorities: if the Gluster repo has priority=50, then a simple yum install glusterfs-server will find the version specified in the Gluster repo, not the RHEL repo.

@skpy
Copy link
Contributor Author

skpy commented Nov 19, 2014

Specifying the repo version but not specifying a package version does not work, either.

It appears that the best viable solution is to specify the full version to install and parse the repo details from that.

Which means that users will need to handle el6 and el7 on their own in some way.

@skpy
Copy link
Contributor Author

skpy commented Nov 19, 2014

A potential solution for supporting multiple major RHEL releases without a lot of work in this module would be to use Hiera interpolation in the following way:

gluster::version: "3.5.2-1.el%{::operatingsystemmajrelease}"

skpy pushed a commit that referenced this issue Nov 20, 2014
The `gluster::repo::yum` class now accepts a `priority` parameter that
specifies a weight to apply to the repo.  This ensures that this repo is
evaluated before any others.

Closes issue #4.

Also adds a CHANGELOG, and bumps the version number in the metadata.json
file for the Puppet Forge.
@skpy
Copy link
Contributor Author

skpy commented Nov 21, 2014

Resolved with PR #5

@skpy skpy closed this as completed Nov 21, 2014
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

1 participant