openshift-kni / lifecycle-agent

Local agent for orchestration of SNO Image Based Upgrade
Apache License 2.0
6 stars 26 forks source link

CNF-12806: IBU: Inspect seed image before pulling #558

Closed donpenney closed 3 weeks ago

donpenney commented 3 weeks ago

Background / Context

LCA uses labels on the seed image for certain config information, which allows validation against the seed image to ensure it is compatible.

Issue / Requirement / Reason for change

The image labels can be inspected prior to pulling the seed image, in order to do validation prior to the pull. Since the seed image is more than 1G, doing this ahead of the pull can save downloading the image in the case where the validation would fail.

Implementation Details

Using skopeo inspect to remotely access the image labels, rather than podman inspect, we can validate the seed image using the labels before pulling the image.

openshift-ci-robot commented 3 weeks ago

@donpenney: This pull request references CNF-12806 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 story to target the "4.17.0" version, but no target version was set.

In response to [this](https://github.com/openshift-kni/lifecycle-agent/pull/558): ># Background / Context > >LCA uses labels on the seed image for certain config information, which allows validation against the seed image to ensure it is compatible. > ># Issue / Requirement / Reason for change > >The image labels can be inspected prior to pulling the seed image, in order to do validation prior to the pull. Since the seed image is more than 1G, doing this ahead of the pull can save downloading the image in the case where the validation would fail. > ># Implementation Details > >Using `skopeo inspect` to remotely access the image labels, rather than `podman inspect`, we can validate the seed image using the labels before pulling the image. Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift-kni%2Flifecycle-agent). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
donpenney commented 3 weeks ago

/jira-refresh

jc-rh commented 3 weeks ago

/lgtm

donpenney commented 3 weeks ago

/retest

donpenney commented 3 weeks ago

/retest

donpenney commented 3 weeks ago

/retest

donpenney commented 3 weeks ago

/retest

donpenney commented 3 weeks ago

/retest

openshift-ci[bot] commented 3 weeks ago

@donpenney: The following tests 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 9e27654d5e8b0e292cd3d3be3a64530b57b8b013 link false /test ibu-e2e-flow
ci/prow/ibi-e2e-flow 9e27654d5e8b0e292cd3d3be3a64530b57b8b013 link false /test ibi-e2e-flow

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
pixelsoccupied commented 3 weeks ago

@donpenney looks like the last update I pushed the wrong check

2024-06-07T00:14:21.910582148Z 2024-06-07T00:14:21Z INFO    controllers.ImageBasedUpgrade.ibu-manager-client    Setting up retry middleware
2024-06-07T00:14:21.926695060Z 2024-06-07T00:14:21Z INFO    setup   Saved IBU CR found, restoring ...
2024-06-07T00:14:21.930108925Z 2024-06-07T00:14:21Z ERROR   setup   unable to initialize IBU CR {"error": "failed to delete IBU during restore: imagebasedupgrades.lca.openshift.io \"upgrade\" not found"}
2024-06-07T00:14:21.930108925Z main.main
2024-06-07T00:14:21.930108925Z  /opt/app-root/src/main/main.go:185
2024-06-07T00:14:21.930108925Z runtime.main
2024-06-07T00:14:21.930108925Z  /usr/lib/golang/src/runtime/proc.go:267

This should fix the CI https://github.com/openshift-kni/lifecycle-agent/pull/560

tsorya commented 3 weeks ago

/approve

openshift-ci[bot] commented 3 weeks ago

[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: - ~~[OWNERS](https://github.com/openshift-kni/lifecycle-agent/blob/main/OWNERS)~~ [tsorya] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment