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

MGMT-19545: Replace seed cluster mirror registries in IBI preparation step #727

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mresvanis
Copy link
Collaborator

Background / Context

During the installation step of IBI, after setting up the new stateroot we precache the seed cluster's container images. Although there is support for mirror registries when creating the installation ISO, we currently don't account for the seed image containing pull-specs from mirror registries (i.e. the seed image was generated in a cluster with mirror registries configured). This results in the IBI preparation/installation step to fail when trying to pull images from the release mirror registries of the seed cluster, instead of the target cluster's release mirror registries (or the original release registries if no mirror registries are configured on the target cluster).

Issue / Requirement / Reason for change

We want to support different mirror registry configuration between the seed and the target cluster, in order to enable IBI with seed images generated from disconnected SNO clusters.

Solution / Feature Overview

During the IBI preparation step before precaching the seed cluster's images, we can replace the seed release mirror registry with the target release (mirror) registry. That's exactly what we do in IBU here.

Implementation Details

In order to replace the seed release mirror registry with the target release (mirror) registry, we need the seed's release registry and the target's release registry. We can read the first one from the manifest.json that's included in the seed image.We can read the second one from the new IBI preparation configuration field ReleaseRegistry, which we will add during the creation of the installation ISO.

Other Information

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 23, 2025

@mresvanis: This pull request references MGMT-19545 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set.

In response to this:

Background / Context

During the installation step of IBI, after setting up the new stateroot we precache the seed cluster's container images. Although there is support for mirror registries when creating the installation ISO, we currently don't account for the seed image containing pull-specs from mirror registries (i.e. the seed image was generated in a cluster with mirror registries configured). This results in the IBI preparation/installation step to fail when trying to pull images from the release mirror registries of the seed cluster, instead of the target cluster's release mirror registries (or the original release registries if no mirror registries are configured on the target cluster).

Issue / Requirement / Reason for change

We want to support different mirror registry configuration between the seed and the target cluster, in order to enable IBI with seed images generated from disconnected SNO clusters.

Solution / Feature Overview

During the IBI preparation step before precaching the seed cluster's images, we can replace the seed release mirror registry with the target release (mirror) registry. That's exactly what we do in IBU here.

Implementation Details

In order to replace the seed release mirror registry with the target release (mirror) registry, we need the seed's release registry and the target's release registry. We can read the first one from the manifest.json that's included in the seed image.We can read the second one from the new IBI preparation configuration field ReleaseRegistry, which we will add during the creation of the installation ISO.

Other Information

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 23, 2025
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 23, 2025
Copy link
Contributor

openshift-ci bot commented Jan 23, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign donpenney for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Jan 23, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@mresvanis mresvanis force-pushed the ibi-prepare-support-mirrors branch from 8108a74 to 55525ef Compare January 23, 2025 10:15
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 23, 2025
@mresvanis mresvanis force-pushed the ibi-prepare-support-mirrors branch from 55525ef to 3d0c994 Compare January 23, 2025 10:22
@@ -123,7 +123,7 @@ func getDeploymentFromDeploymentID(deploymentID string) (string, error) {
}

func SetupStateroot(log logr.Logger, ops ops.Ops, ostreeClient ostreeclient.IClient,
rpmOstreeClient rpmostreeclient.IClient, seedImage, expectedVersion, imageListFile string, ibi bool) error {
rpmOstreeClient rpmostreeclient.IClient, seedImage, expectedVersion, tmpPath string, ibi bool) error {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should probably rename tmpPath to something indicating that this is for IBI. @eranco74 WDYT?

@mresvanis
Copy link
Collaborator Author

/test all

@mresvanis
Copy link
Collaborator Author

/test ibu-e2e-flow

Copy link
Contributor

openshift-ci bot commented Jan 24, 2025

@mresvanis: 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/ibu-e2e-flow 947b819 link false /test ibu-e2e-flow

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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants