Description of problem: When building distro: rhel image diskimage-builder/elements/rhel-common/pre-install.d/00-rhel-registration file us used, where repos are hardcoded: rhel-8-for-x86_64-appstream-rpms, rhel-8-for-x86_64-baseos-rpms and satellite-tools-6.5-for-rhel-8-x86_64-rpms. These are not overriden by REG_REPOS variable, and builder always tries to use them. In case of local satellite these repos might not exist, or have different names (like EUS repos). Moreover - even after modification of 00-rhel-registration file, and cleanup of __pycache__ and pyc, diskbuilder uses old code. After failure of first run, when I perform a re-run, the new code is consumed, and build passes. Such behaviour breaks OpenStack deployment automation Version-Release number of selected component (if applicable): diskimage-builder-3.0.1-0.20200609103442.68017d0.el8ost.noarch rhosp-director-images-16.1-20201003.1.el8ost.noarch rhosp-director-images-x86_64-16.1-20201003.1.el8ost.noarch rhosp-director-images-ipa-x86_64-16.1-20201003.1.el8ost.noarch rhosp-director-images-ipa-16.1-20201003.1.el8ost.noarch How reproducible: Always Steps to Reproduce: Follow instructions as per https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html/director_installation_and_usage/creating-whole-disk-images for local satellite deployment. Provide EUS repos instead of classic ones. Actual results: First build failed Expected results: - Be able to change repos selection - OR at least have a workaround which would work for the initial run of disk builder. Additional info:
It does look like upstream needs a change where this conditional[1] is only true if REG_REPOS is not set. We can document that if REG_REPOS is used it must be a complete list, since no base repos will be added. [1] https://opendev.org/openstack/diskimage-builder/src/branch/master/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration#L16
We're using a complete list but it still appends the non eus repositories ... export REG_REPOS=" ansible-2.9-for-rhel-8-x86_64-rpms fast-datapath-for-rhel-8-x86_64-rpms rhel-8-for-x86_64-highavailability-eus-rpms openstack-16.1-for-rhel-8-x86_64-rpms rhceph-4-tools-for-rhel-8-x86_64-rpms advanced-virt-for-rhel-8-x86_64-rpms rhel-8-for-x86_64-appstream-eus-rpms rhel-8-for-x86_64-baseos-eus-rpms ansible-2.9-for-rhel-8-x86_64-rpms fast-datapath-for-rhel-8-x86_64-rpms rhv-4-mgmt-agent-for-rhel-8-x86_64-rpms rhv-4.4-manager-for-rhel-8-x86_64-rpms advanced-virt-for-rhel-8-x86_64-rpms jb-eap-7.3-for-rhel-8-x86_64-rpms" and it does this: 2021-03-10 20:58:25.206 | Enabling repos: repos --enable rhel-8-for-x86_64-appstream-rpms --enable rhel-8-for-x86_64-baseos-rpms --enable ansible-2.9-for-rhel-8-x86_64-rpms --enable fast-datapath-for-rhel-8-x86_64-rpms --enable rhel-8-fo r-x86_64-highavailability-eus-rpms --enable openstack-16.1-for-rhel-8-x86_64-rpms --enable rhceph-4-tools-for-rhel-8-x86_64-rpms --enable advanced-virt-for-rhel-8-x86_64-rpms --enable rhel-8-for-x86_64-appstream-eus-rpms --enable rhel-8- for-x86_64-baseos-eus-rpms --enable ansible-2.9-for-rhel-8-x86_64-rpms --enable fast-datapath-for-rhel-8-x86_64-rpms --enable rhv-4-mgmt-agent-for-rhel-8-x86_64-rpms --enable rhv-4.4-manager-for-rhel-8-x86_64-rpms --enable advanced-virt- for-rhel-8-x86_64-rpms --enable jb-eap-7.3-for-rhel-8-x86_64-rpms
Looks like it is now in /usr/lib/python3.6/site-packages/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration instead... we were updating the wrong file.
I've proposed a fix for this upstream
Looks good, thanks
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 (Red Hat OpenStack Platform 16.1.7 (Train) bug fix and enhancement advisory), 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/RHBA-2021:3762