View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000042 | AlmaLinux-8 | almalinux-release | public | 2021-03-19 04:56 | 2021-03-21 19:56 |
| Reporter | conathan | Assigned To | alukoshko | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Platform | Linux | OS | AlmaLinux | OS Version | 8.3 RC |
| Summary | 0000042: os-release shows VERSION_ID="8.3", causing issues with the templates folder names in chef/cinc | ||||
| Description | When using chef/cinc 16.10.8 (https://cinc.sh), it finds templates in the templates/almalinux-8.3 folder, while centos finds it in templates/centos -8. When looking into why, I found that it uses /etc/os-release to get the version, from VERSION_ID. Centos 7, has VERSION_ID="7" Centos 8, has VERSION_ID="8" AlmaLinux has VERSION_ID="8.3" Note: Not saying it's wrong (or not a cinc issue), but is a behavioral difference in comparison to centos 7/8 so thought I would start here before bringing this up at chef/cinc * Editing the file manually and setting to VERSION_ID="8" it now works as intended | ||||
| Steps To Reproduce | cat /etc/os-release on centos 8, vs almalinux 8 (CentOS) [/root]# cat /etc/os-release NAME="CentOS Linux" VERSION="8" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="8" PLATFORM_ID="platform:el8" PRETTY_NAME="CentOS Linux 8" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:8" HOME_URL="https://centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-8" CENTOS_MANTISBT_PROJECT_VERSION="8" (AlmaLinux) [/root]# cat /etc/os-release NAME="AlmaLinux" VERSION="8.3 (Purple Manul)" ID="almalinux" ID_LIKE="rhel centos fedora" VERSION_ID="8.3" PLATFORM_ID="platform:el8" PRETTY_NAME="AlmaLinux 8.3 RC (Purple Manul)" ANSI_COLOR="0;34" CPE_NAME="cpe:/o:almalinux:almalinux:8.3:rc" HOME_URL="https://almalinux.org/" BUG_REPORT_URL="https://bugs.almalinux.org/" ALMALINUX_MANTISBT_PROJECT="AlmaLinux-8" ALMALINUX_MANTISBT_PROJECT_VERSION="8.3" --- Leaving off reproduction of this via cinc (Can provide more details if needed), but main issue I wanted to bring up, is VERSION_ID being 8.3 vs 8. | ||||
| Tags | No tags attached. | ||||
| abrt_hash | |||||
| URL | |||||
|
|
Hello and thanks for report. VERSION_ID="8.3" in AlmaLinux's os-release is not a bug and RHEL and Oracle Linux both use VERSION_ID="8.3" as well. We need more details on this. Where is templates/almalinux-8 folder? Which project provides it? What folder name used for RHEL and Oracle? |
|
|
(From that, I'd consider this a non issue and the ticket should probably be rejected), with it being up to chef/cinc to adapt to almalinux having 8.3. (If it is this way in RHEL 8, I imagine there is possibly code in the project to deal with that case). * Actually, probaby the ohai rubygem I suspect, vs chef/cinc directly But expanding with more details on how cinc (A fork of chef) is behaving with this To give an chef(https://www.chef.io/) / cinc(https://cinc.sh/) example, It is used as a way of automating setup of a server or project. Here's a basic example, that could replace the /etc/motd file (a template), These centos-8 (and what I switched to almalinux-8.3) folders are created by myself in these cases, which then the motd/recipe/default.rb file get's ran on any server I run chef-client on. To find which template to use, it goes through the following (using centos-8 as an example) templates/host-localhost templates/centos-8 templates/centos templates/default and finds motd.erb While on almalinux: templates/host-localhost templates/almalinux-8.3 templates/almalinux templates/default (So when almalinux 8.4 comes out, I'll have to create those template folders and move the files over, or symlink) echo > cookbooks/motd/recipes/default.rb << EOF # Replace /etc/motd with the template file template "/etc/motd" EOF echo > cookbooks/motd/metadata.rb << "EOF" maintainer "Example" maintainer_email "example@example.com" name "motd" license "example" description "An example cinc recipe" version "0.0.2" recipe "motd", "Install motd" EOF echo > cookbooks/motd/templates/centos-8/motd.erb << EOF This is Centos 8 EOF echo > cookbooks/motd/templates/centos/motd.erb << EOF This is Centos EOF echo > cookbooks/motd/templates/almalinux-8.3/motd.erb << EOF This is AlmaLinux 8.3 EOF echo > cookbooks/motd/templates/almalinux/motd.erb << EOF This is AlmaLinux EOF At this time, I do not have access to a RHEL or Oracle based installation to know how the folder paths behave in those cases. (I didn't realize at the time they used major/minor versioning when I opened this ticket). |
|
|
You can try to simulate it actually. Here is /etc/os-release from RHEL 8.3: NAME="Red Hat Enterprise Linux" VERSION="8.3 (Ootpa)" ID="rhel" ID_LIKE="fedora" VERSION_ID="8.3" PLATFORM_ID="platform:el8" PRETTY_NAME="Red Hat Enterprise Linux 8.3 (Ootpa)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:8.3:GA" HOME_URL="https://www.redhat.com/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8" REDHAT_BUGZILLA_PRODUCT_VERSION=8.3 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="8.3" |
|
|
With that, It was using templates/redhat-8.3, (interesting, unless it's changing behavior based on something else, but I also updated /etc/redhat-release as that's another one it uses for behavior). But at least for now, it's farther and farther away from an AlmaLinux Environment issue. (Especially if VERSION_ID=MAJOR.MINOR is in Redhat/Oracle Linux). Thank you for all your assistance. |
|
|
Thank you for feedback. Closing. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2021-03-19 04:56 | conathan | New Issue | |
| 2021-03-19 07:43 | alukoshko | Note Added: 0000061 | |
| 2021-03-19 08:05 | alukoshko | Assigned To | => alukoshko |
| 2021-03-19 08:05 | alukoshko | Status | new => assigned |
| 2021-03-19 08:26 | alukoshko | Status | assigned => feedback |
| 2021-03-19 09:06 | conathan | Note Added: 0000063 | |
| 2021-03-19 09:06 | conathan | Status | feedback => assigned |
| 2021-03-19 09:16 | alukoshko | Note Added: 0000064 | |
| 2021-03-19 09:16 | alukoshko | Note Edited: 0000064 | |
| 2021-03-19 10:05 | alukoshko | Status | assigned => feedback |
| 2021-03-19 21:02 | conathan | Note Added: 0000067 | |
| 2021-03-19 21:02 | conathan | Status | feedback => assigned |
| 2021-03-21 19:56 | alukoshko | Note Added: 0000068 | |
| 2021-03-21 19:56 | alukoshko | Status | assigned => closed |
| 2021-03-21 19:56 | alukoshko | Resolution | open => no change required |