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

Merged

Conversation

mresvanis
Copy link
Collaborator

@mresvanis mresvanis commented Jan 23, 2025

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 (e.g. the seed image was generated in a cluster with an OCP release image from a private registry). This results in the IBI preparation/installation step to fail when trying to pull images from the 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

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
internal/prep/prep.go Outdated Show resolved Hide resolved
@mresvanis mresvanis force-pushed the ibi-prepare-support-mirrors branch 4 times, most recently from be72473 to 85de2e5 Compare January 29, 2025 15:48
@mresvanis mresvanis marked this pull request as ready for review January 29, 2025 15:48
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 29, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 29, 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 (e.g. the seed image was generated in a cluster with an OCP release image from a private registry). This results in the IBI preparation/installation step to fail when trying to pull images from the 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.

@mresvanis
Copy link
Collaborator Author

/retest

api/ibiconfig/ibiconfig.go Show resolved Hide resolved
internal/prep/prep.go Outdated Show resolved Hide resolved
lca-cli/ibi-preparation/ibipreparation.go Outdated Show resolved Hide resolved
lca-cli/ibi-preparation/ibipreparation.go Outdated Show resolved Hide resolved
lca-cli/ibi-preparation/ibipreparation.go Outdated Show resolved Hide resolved
@mresvanis mresvanis force-pushed the ibi-prepare-support-mirrors branch from 85de2e5 to 07b2fb7 Compare January 30, 2025 10:03
@mresvanis mresvanis requested review from tsorya and removed request for omertuc February 3, 2025 07:19
internal/prep/prep.go Outdated Show resolved Hide resolved
@mresvanis mresvanis force-pushed the ibi-prepare-support-mirrors branch 2 times, most recently from 5b7cffa to 18f4052 Compare February 4, 2025 14:36
@mresvanis
Copy link
Collaborator Author

/test ibu-e2e-flow

@tsorya
Copy link
Contributor

tsorya commented Feb 5, 2025

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 5, 2025
Copy link
Contributor

openshift-ci bot commented Feb 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tsorya

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 5, 2025
@mresvanis
Copy link
Collaborator Author

/test integration

@openshift-merge-bot openshift-merge-bot bot merged commit a975ee6 into openshift-kni:main Feb 6, 2025
9 checks passed
@mresvanis mresvanis deleted the ibi-prepare-support-mirrors branch February 6, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants