Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1954571

Summary: Ansible does not correctly detect distribution_version on oVirt Node based on CentOS Stream 8
Product: [oVirt] ovirt-release Reporter: Jean-Louis Dupond <jean-louis>
Component: GeneralAssignee: Lev Veyde <lveyde>
Status: CLOSED CURRENTRELEASE QA Contact: Sandro Bonazzola <sbonazzo>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.4.6CC: bugs, cshao, yaniwang
Target Milestone: ovirt-4.4.6Keywords: Regression, VerifiedUpstream
Target Release: 4.4.6Flags: sbonazzo: ovirt-4.4+
sbonazzo: blocker+
sbonazzo: planning_ack?
sbonazzo: devel_ack?
sbonazzo: testing_ack?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.4.6_rc6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-05 05:36:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1954589    
Bug Blocks:    

Description Jean-Louis Dupond 2021-04-28 11:49:56 UTC
Description of problem:
On a oVirt node ansible detects CentOS Stream 8 as following:
# ansible localhost -m setup | grep dist
        "ansible_distribution": "CentOS",
        "ansible_distribution_file_parsed": true,
        "ansible_distribution_file_path": "/etc/redhat-release",
        "ansible_distribution_file_variety": "RedHat",
        "ansible_distribution_major_version": "4",
        "ansible_distribution_release": "NA",
        "ansible_distribution_version": "4.4",


This is because data is parsed from /etc/os-release, which contains some oVirt version information.

Version-Release number of selected component (if applicable):
Happens on ansible 2.9.18 as on 2.9.20


Steps to Reproduce:
1. SSH to a oVirt-Node with CentOS Stream 8
2. ansible localhost -m setup | grep dist
3. See the above results

Expected results:
Ansible should show CentOS 8 as version. Because now multiple oVirt ansible roles break because of this.

Comment 1 RHEL Program Management 2021-04-28 11:54:59 UTC
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.

Comment 2 Sandro Bonazzola 2021-04-28 12:23:22 UTC
This is due to ansible issue reported 2 years ago here: https://github.com/ansible/ansible/issues/61443 and never handled by ansible community.

Comment 3 Sandro Bonazzola 2021-04-28 12:26:44 UTC
Proposing to override CentOS Stream VERSION with version taken from centos-stream-release rpm version (centos-stream-release-8.5-2.el8.noarch.rpm -> 8.5)

Comment 4 Lev Veyde 2021-04-28 18:59:21 UTC
A patch was added with a workaround on our side.

Comment 5 Lev Veyde 2021-04-28 21:45:19 UTC
A new version is (going to be) available from here:

https://jenkins.ovirt.org/job/ovirt-node-ng-image_master_build-artifacts-el8-x86_64/679/

Comment 6 Lev Veyde 2021-04-29 10:39:39 UTC
Initial build process failed to build an image.
Made a new build which is available from here:

https://jenkins.ovirt.org/job/ovirt-node-ng-image_master_build-artifacts-el8-x86_64/682/

Comment 7 Lev Veyde 2021-04-29 12:24:28 UTC
From the system with the new image:

# ansible -m setup localhost | grep dist
        "ansible_distribution": "CentOS",
        "ansible_distribution_file_parsed": true,
        "ansible_distribution_file_path": "/etc/redhat-release",
        "ansible_distribution_file_variety": "RedHat",
        "ansible_distribution_major_version": "8",
        "ansible_distribution_release": "NA",
        "ansible_distribution_version": "8.4",

# cat /etc/os-release 
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8.4.2105.0"
VARIANT="oVirt Node 4.4.6_rc6"
VARIANT_ID="ovirt-node"
PRETTY_NAME="oVirt Node 4.4.6"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.ovirt.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
PLATFORM_ID="platform:el8"

Comment 8 Sandro Bonazzola 2021-04-30 06:54:12 UTC
Adding automated testing to detect further cases: https://gerrit.ovirt.org/#/c/ovirt-node-ng-image/+/114574/

Comment 9 Sandro Bonazzola 2021-05-05 05:36:37 UTC
This bugzilla is included in oVirt 4.4.6 release, published on May 4th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.6 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.