Bug 1954571 - Ansible does not correctly detect distribution_version on oVirt Node based on CentOS Stream 8
Summary: Ansible does not correctly detect distribution_version on oVirt Node based on...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-release
Classification: oVirt
Component: General
Version: 4.4.6
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ovirt-4.4.6
: 4.4.6
Assignee: Lev Veyde
QA Contact: Sandro Bonazzola
URL:
Whiteboard:
Depends On: 1954589
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-28 11:49 UTC by Jean-Louis Dupond
Modified: 2021-05-07 01:32 UTC (History)
3 users (show)

Fixed In Version: 4.4.6_rc6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-05 05:36:37 UTC
oVirt Team: Node
Embargoed:
sbonazzo: ovirt-4.4+
sbonazzo: blocker+
sbonazzo: planning_ack?
sbonazzo: devel_ack?
sbonazzo: testing_ack?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 114534 0 ovirt-4.4 MERGED Use manually specified VERSION_ID 2021-04-28 19:13:08 UTC
oVirt gerrit 114544 0 master MERGED Use manually specified VERSION_ID 2021-04-29 06:49:44 UTC
oVirt gerrit 114574 0 master MERGED automation: check ansible sanity 2021-05-04 06:46:17 UTC
oVirt gerrit 114608 0 ovirt-4.4 MERGED automation: check ansible sanity 2021-05-04 12:31:45 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.