Bug 2100644 - openshift-ansible FTBFS on RHEL8
Summary: openshift-ansible FTBFS on RHEL8
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.11
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: ---
: 4.11.0
Assignee: Nobody
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks: 2100850
TreeView+ depends on / blocked
 
Reported: 2022-06-23 21:08 UTC by Yaakov Selkowitz
Modified: 2022-08-10 11:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:19:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ocp-build-data pull 1718 0 None Merged [4.11] Reinstate openshift-ansible RPM, build for RHEL8 2022-06-24 14:45:19 UTC
Github openshift openshift-ansible pull 12398 0 None Merged Bug 2100644: Fix FTBFS on RHEL8 2022-06-24 01:52:31 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:19:22 UTC

Description Yaakov Selkowitz 2022-06-23 21:08:13 UTC
4.11 builds of openshift-ansible were stopped by https://github.com/openshift/ocp-build-data/commit/8a976dccad2bfeb73c7b63c422e986cf4146dd08 due to a build error.  However, the package is still needed for BYO RHEL (now 8).  Since we are looking to drop RHEL7 RPMs wherever possible, and it certainly makes no sense to require specifically a RHEL7 ansible host in order to configure RHEL8 worker nodes, we need to make openshift-ansible buildable on RHEL8 and reinstate the builds.

The build error that triggered this is unversioned python shebangs in scripts and modules included in openshift-ansible.  In RHEL8, /usr/bin/python is not provided by any package, and therefore packages must normally specify either python2 or python3.  While the script that checks for python shebangs also has some ability to fix them automatically, that did not work for one of the files:

** ERROR: ambiguous python shebang in /usr/share/ansible/openshift-ansible/inventory/dynamic/gcp/hosts.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.

This script in its current state is not compatible with Python 3, so either it needs to use 2, or be ported to 3.

Note that CI, QE, and Docs all need to be updated for using a RHEL8 ansible host (instead of RHEL7) for configuring RHEL8 worker nodes.  Also, whether RHEL8 openshift-ansible packages should be backported to stable versions where RHEL8 worker nodes are supported (4.9/4.10) should be at least discussed.

Comment 2 Yaakov Selkowitz 2022-06-23 23:28:55 UTC
CI draft changes: https://github.com/openshift/openshift-ansible/pull/12399
That will require changes to https://github.com/openshift/release/tree/master/ci-operator/config/openshift/openshift-ansible for relevant branches; assistance will be needed.
With code freeze quickly approaching, I have not attached that PR to this BZ.

Comment 4 Gaoyun Pei 2022-06-24 09:05:24 UTC
Thanks for implementing this.

Tested with the following release on RHEL-8.6:
ansible-2.9.27-1.el8ae.noarch
openshift-ansible-4.11.0-202206240216.p0.g9de1722.assembly.stream.el8.noarch.

openshift-ansible package could be installed successfully on the RHEL-8 host, both /usr/share/ansible/openshift-ansible/playbooks/scaleup.yml and /usr/share/ansible/openshift-ansible/playbooks/upgrade.yml work well on RHEL-8 host. RHEL-8 workers could be added/upgraded.

Comment 5 Gaoyun Pei 2022-06-24 09:06:43 UTC
Also filed https://bugzilla.redhat.com/show_bug.cgi?id=2100766 to request doc update on this.

Comment 8 errata-xmlrpc 2022-08-10 11:19:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2022:5069


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