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

(MODULES-7758) Properly handle distro tag for Fedora platforms #321

Merged
merged 1 commit into from
Sep 11, 2018

Conversation

ekinanp
Copy link
Contributor

@ekinanp ekinanp commented Sep 5, 2018

There were some recent changes made to remove the 'f' prefix for our
older Fedora platforms, specifically Fedora 26 and 27. However, this
inadvertently changed our distro tag for these platforms to also remove
the 'f' prefix so that e.g. fedoraf26 became fedora26. This change was not
carried over to the puppet_agent module. Furthermore, newer Fedora
platforms like Fedora 28 use the newer fc<major_version> distro tag
for the puppet5 collection. The puppet_agent module was also not
updated with this change. Thus, some agent upgrades were failing on our
Fedora platforms.

This commit updates the puppet_agent module to handle all possible cases
of the distro tag for our Fedora platforms.

$dist_tag = "fc${::operatingsystemmajrelease}"
} elsif (versioncmp("${package_version}", '5.5.3') > 0) {
$dist_tag = "fedora${::operatingsystemmajrelease}"
} else {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the PC1 collection will always hit the else branch since the agent version's older than 5.5.3, which is what we want.

@ekinanp
Copy link
Contributor Author

ekinanp commented Sep 5, 2018

I've tested the code here on several upgrade paths (on top of the unit tests):

* Upgrade from 2017.3.8 => 2018.1.0 for Fed. 27
* Upgrade 2018.1.4 => 2018.1.5.dev_version for Fed. 27 and 28
* Upgrade from 2018.1.5.dev_version => 2019.0.0.dev_version for Fed. 27 and 28

The upgrades all pass, so this should be good to go once CI passes.

There were some recent changes made to remove the 'f' prefix for our
older Fedora platforms, specifically Fedora 26 and 27. However, this
inadvertently changed our distro tag for these platforms to also remove
the 'f' prefix so that e.g. fedoraf26 became fedora26. This change was not
carried over to the puppet_agent module. Furthermore, newer Fedora
platforms like Fedora 28 use the newer fc<major_version> distro tag
for the puppet5 collection. The puppet_agent module was also not
updated with this change. Thus, some agent upgrades were failing on our
Fedora platforms.

This commit updates the puppet_agent module to handle all possible cases
of the distro tag for our Fedora platforms.
@ekinanp ekinanp force-pushed the fix-fedora-upgrades branch from 1d492b2 to 65a80ea Compare September 5, 2018 00:59
@puppetcla
Copy link

CLA signed by all contributors.

@smcclellan smcclellan merged commit 02743dd into puppetlabs:1.x Sep 11, 2018
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.

3 participants