Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rhcos-4.11-new] Dockerfile: Add repovar for RHCOS repos #3198

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

ravanelli
Copy link
Member

  • We need a way to determine the ocp version for the rhel-8-server-ose repository configuration. It is needed in order to use a single branch for the internal redhat-coreos repo,

Signed-off-by: Renata Ravanelli rravanel@redhat.com

@dustymabe
Copy link
Member

I think for this maybe it would be better to put it in the pipeline directly and use environment variables in the form of DNF_VAR_OCP_RELEASE=4.11.

@ravanelli
Copy link
Member Author

I think for this maybe it would be better to put it in the pipeline directly and use environment variables in the form of DNF_VAR_OCP_RELEASE=4.11.

I think the only issue with that is, if someone wants to test it manually and is not aware of it, cosa fetch will fail. Because the var repo definition will be only in the pipeline. If we go for it, would be nice to have something in the cosa fetch help message about it.

@cgwalters
Copy link
Member

Currently in Prow jobs we do https://github.com/openshift/os/blob/cc5fef39c588c11892c9250e8a33e2ecb1ee18fa/ci/get-ocp-repo.sh#L3

I think it'd make sense short term to lower support for that into coreos-assembler.

@jlebon
Copy link
Member

jlebon commented Nov 15, 2022

Hmm, or lower it into rpm-ostree? We could also formalize OCP release references. Something like:

variables:
  osversion: "rhel-8.6"
  ocprelease: "4.12"

repos:
  - rhel-8-baseos
  - rhel-8-appstream
  - rhel-8-fast-datapath
  - rhel-8-server-ose

repovars:
  ocprelease: "${ocprelease}"

mutate-os-release: "${ocprelease}"

@jlebon
Copy link
Member

jlebon commented Nov 15, 2022

Hmm, or lower it into rpm-ostree?

Proposal in coreos/rpm-ostree#4152.

@dustymabe
Copy link
Member

Proposal in coreos/rpm-ostree#4152.

👍 - for the older releases that won't get a new version of rpm-ostree we can just add a file to the COSA image for that stream.

@ravanelli ravanelli changed the base branch from main to rhcos-4.11-new November 16, 2022 16:35
@ravanelli ravanelli changed the title cmd-fetch: Add the ability to add a yum variable during fetch Dockerfile: Add repovar for RHCOS repos Nov 16, 2022
@ravanelli
Copy link
Member Author

👍 - for the older releases that won't get a new version of rpm-ostree we can just add a file to the COSA image for that stream.

Thanks all, for checking it.
As discussed with @dustymabe and @jlebon, I changed this PR to support the old releases only.

@dustymabe
Copy link
Member

the old PR was creating a file named OCP_RELEASE. This one is creating a file named ocprelease. Which one is more appropriate?

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the old PR was creating a file named OCP_RELEASE. This one is creating a file named ocprelease. Which one is more appropriate?

Cool either way but slightly prefer the latter for consistency with the traditional other urlvars like releasever and basearch.

Dockerfile Outdated
@@ -35,6 +35,10 @@ RUN chmod g=u /etc/passwd
# also allow adding certificates
RUN chmod -R g=u /etc/pki/ca-trust

# Add dnf repovar to be used in the RHCOS repos
RUN mkdir -p /etc/dnf/var
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super minor: We can drop this and assume it exists. Avoids adding another layer to the image. :)

@jlebon jlebon changed the title Dockerfile: Add repovar for RHCOS repos [rhcos-4.11-new] Dockerfile: Add repovar for RHCOS repos Nov 16, 2022
 - For old releases, the feature adding support
for repovars in rpm-ostree don't work. That's why we are adding it
manually.
 - It is need to determine the ocp version for repos like rhel-8-server-ose,
in order the use a single branch for the internal redhat-coreos repo.

More info:
 - coreos/rpm-ostree#4152

Signed-off-by: Renata Ravanelli <rravanel@redhat.com>
Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openshift-ci
Copy link

openshift-ci bot commented Nov 16, 2022

@ravanelli: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/rhcos 7f9b582 link true /test rhcos

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@dustymabe
Copy link
Member

CI failure is expected: Could not find remote branch release-4.11-new to clone. Merging...

@dustymabe dustymabe merged commit 76f031a into coreos:rhcos-4.11-new Nov 16, 2022
@ravanelli ravanelli deleted the ocp-release branch June 1, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants