Skip to content

Node image: need to include repos based on OS ID and VERSION_ID #1793

@joelcapitao

Description

@joelcapitao

To build node image, we currently include repos based on id as per:

conditional-include:
- if: id == "rhel"
include:
repos:
- rhel-9.6-baseos
- rhel-9.6-appstream
- rhel-9.6-early-kernel
- rhel-9.6-fast-datapath
- rhel-9.6-server-ose-4.19
- if: id == "centos"
include:
repos:
- c9s-baseos
- c9s-appstream
- c9s-sig-nfv
- c9s-sig-cloud-okd
# XXX: this shouldn't be here; see related XXX in Containerfile
- rhel-9.6-server-ose-4.19-okd

and the value is passed with:

os/build-node-image.sh

Lines 37 to 38 in 9b587eb

rpm-ostree experimental compose treefile-apply \
--var id=$ID /run/src/packages-openshift.yaml

itself based on :

source /etc/os-release

We would need to use the env var VERSION_ID as condition as well in order to be able to build for EL10 with the right repos.

Based on this commit message coreos/rpm-ostree@99aff16 @jlebon tempted to implement --var-from-os-release as parameter when using treefile-apply, but decided to go with current solution to get #1498 merged quickly.
I think implementing --var-from-os-release should be the way to go for long-term solution.
For short-term, maybe we should pass the required values in id var as per: --var id="${ID}_${VERSION_ID}", and edit the conditional-include list by adding the rhel_9, rhel_10, centos_9 and centos_10 entries.

What are your thoughts on this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions