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.
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.
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.
Also filed https://bugzilla.redhat.com/show_bug.cgi?id=2100766 to request doc update on this.
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