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 Red Hat facts on version 4.2 #257

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

anders-larsson
Copy link
Contributor

Current fact file for redhat-9 seems to have been made using a CentOS system as template. However this does not properly reflect a Red Hat 9 system. Most important change in this is adding os.distro.release.minor and os.release.minor and updating operatingsystemrelease, os.distro.release.full, and os.release.full to match the values for a Red Hat 9 system.

Took the opportunity to update codename, description and id to match Red Hat too.

Found this issue when adding support for EL9 in a class where it worked for previous versions of EL.

@bastelfreak
Copy link
Member

@anders-larsson thanks for the PR. We've some redhat facts for othe facter versions as well. can you take a look at those as well?

@anders-larsson
Copy link
Contributor Author

@anders-larsson thanks for the PR. We've some redhat facts for othe facter versions as well. can you take a look at those as well?

Hello,

I'll have a look. Thanks.

@anders-larsson
Copy link
Contributor Author

How strict should it be? File https://github.com/voxpupuli/facterdb/blob/master/facts/4.2/redhat-7-x86_64.facts seems to have been generated using CentOS Stream since release is set to 7.8.2003 which is only used for by CentOS (Stream). However it contains everything that is required for it to work on Red Hat systems.

Maybe worth updating since os.release.full/os.distro.release.full is set to 7.8.2003 which might be used in spec tests though?

@ekohl
Copy link
Member

ekohl commented Oct 26, 2022

Ideally speaking it really is the output of puppet facts show --show-legacy according to https://github.com/voxpupuli/facterdb#add-new-operating-system-support so if you have a real RHEL system, please share the real data. As you say, users could be parsing the full release and create bugs if the data doesn't match.

@anders-larsson
Copy link
Contributor Author

Took a little bit of time due to local environment setup. Included fact file is for a completely vanilla (minimal) redhat-9 system. Only puppet-agent installed. Changed hostname, fqdn, domain and a few other values (for privacy) using the same values as was previously used.

Is this the information we want? I'm not sure why the sorting of values is different now (os is one) now compared to previous file. Used the command mentioned by ekohl. If this is the information we want I'll try to fix it for redhat-7 and redhat-8 from facter 4.2.

@anders-larsson anders-larsson changed the title Update redhat-9 fact to reflect a RedHat 9 system Fix Red Hat facts on version 4.2 Oct 31, 2022
@anders-larsson
Copy link
Contributor Author

I've updated all Red Hat related files for 4.2. I hope this is suitable for your needs. Please tell me if any changes are required. All is default installations for RHEL.

facts/4.2/redhat-7-x86_64.facts Outdated Show resolved Hide resolved
@anders-larsson anders-larsson force-pushed the update_redhat9 branch 2 times, most recently from 51500ee to ca1fc10 Compare October 31, 2022 12:12
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Thanks for sorting. The diff is now much easier to consume.

"interfaces": "eth0,lo",
"ipaddress": "10.0.2.15",
"ipaddress_eth0": "10.0.2.15",
"interfaces": "enp1s0,lo,virbr0",
Copy link
Member

Choose a reason for hiding this comment

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

It'd be slightly easier if there wasn't a virbr0, but it doesn't really matter that much.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure why it was created. I should be able to filter it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be fixed in most recent commit.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Thanks!

@ekohl ekohl merged commit 044e752 into voxpupuli:master Oct 31, 2022
@anders-larsson anders-larsson deleted the update_redhat9 branch October 31, 2022 12:44
@ekohl ekohl linked an issue Oct 31, 2022 that may be closed by this pull request
@bastelfreak bastelfreak added the bug label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RHEL 7 os.release.full values are incorrect
3 participants