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

Fix Support for EL7 and Puppet 4 #66

Merged
merged 4 commits into from
Oct 31, 2015
Merged

Conversation

trlinkin
Copy link
Contributor

This PR fixes up the support for EL7 systems in a manner that works on both Puppet 3 and Puppet 4.

It does however come with the cost of no longer supporting Facter below version 1.7.0 or Puppet Enterprise below release 3.0.0, however these are old enough that this should not be a concern.

This PR does duplicate some of the work in #55 but aims to span the major Puppet versions and have coherent testing additions.

The module originally tried to support EL 7 installations by utilizing
the EPEL repos with a conditional in the `preinstall` class. This
conditional was seemingly valid but failed to work correctly. This is due
to the fact that EL 7 systems have started including a version number
that has a third octet to represent build number. The conditional in
question used the `operatingsystemrelease` fact for comparison and since
the string returned could not be cast to a number, Puppet's ability to
compare would fail. In addition, the comparison of a string to a number
will not work the same way in Puppet 4 as the typing of data is more
strict. So this code will not move to the Puppet 4 DSL successfully.

This commit changes two aspects of the `preinstall` class. First it uses
the `operatingsystemmajrelease` fact that will return a single number
representing the major release of the OS. Second, since the data
returned by the fact is a string, the compared value is a string as the
greater-than and less-than comparisons in Puppet 4 can compare strings
to strings.

Note: the `operatingsystemmajrelease` fact only became available in
Facter 1.7.x and was not included in Puppet Enterprise until the 3.0
release. This does mean that this module will loose a certain amount of
backwards compatibility. Though the versions impacted are old enough
that they should not largely in use any more.
This commit extends the testing suite to include a test validating that
EL 7 based systems will be considered correctly. When EL 7 systems are
encountered, and it is desired to manage the source repo, the EPEL class
should be present in the catalog.
With the recent changes for considering EL 7 nodes, this module will be
considered to be acceptable to run in Puppet 4. In this case, we want
spec failures with Puppet 4 testing to result in failures in the TravisCI
system.

This change removes Puppet 4 as an "acceptable failure" in the TravisCI
system.
This commit adds "7.0" and "7.1" to the list of supported OS versions
for RedHat and Centos.
@arioch
Copy link
Contributor

arioch commented Oct 31, 2015

Looking good, thanks!

@arioch arioch merged commit a2b459f into voxpupuli:master Oct 31, 2015
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

Successfully merging this pull request may close these issues.

2 participants