assisted-service icon indicating copy to clipboard operation
assisted-service copied to clipboard

MGMT-17194: Ensure that we improve error messages for mirror registry tagged images

Open paul-maidment opened this issue 9 months ago • 7 comments

If the user relies on mirror registries, and clusterimageset is set to a tagged image (e.g. quay.io/openshift-release-dev/ocp-release:4.15.0-multi), as opposed to a by digest image (e.g. quay.io/openshift-release-dev/ocp-release@sha256:b86422e972b9c838dfdb8b481a67ae08308437d6489ea6aaf150242b1d30fa1c), then oc will fail to pull with:

--icsp-file only applies to images referenced by digest and will be ignored for tags

This PR adds some additional information to the SpecSynced condition of the AgentClusterInstall if there was a problem with oc, mirror registries is enabled and the supplied image is in tag format.

List all the issues related to this PR

  • [ ] New Feature
  • [x] Enhancement
  • [ ] Bug fix
  • [ ] Tests
  • [ ] Documentation
  • [ ] CI/CD

What environments does this code impact?

  • [x] Automation (CI, tools, etc)
  • [x] Cloud
  • [x] Operator Managed Deployments
  • [x] None

How was this code tested?

  • [ ] assisted-test-infra environment
  • [ ] dev-scripts environment
  • [ ] Reviewer's test appreciated
  • [x] Waiting for CI to do a full test run
  • [ ] Manual (Elaborate on how it was tested)
  • [x] No tests needed

Checklist

  • [x] Title and description added to both, commit and PR.
  • [x] Relevant issues have been associated (see CONTRIBUTING guide)
  • [x] This change does not require a documentation update (docstring, docs, README, etc)
  • [x] Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

paul-maidment avatar May 06 '24 13:05 paul-maidment

@paul-maidment: This pull request references MGMT-17194 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 task to target the "4.16.0" version, but no target version was set.

In response to this:

If the user relies on mirror registries, and clusterimageset is set to a tagged image (e.g. quay.io/openshift-release-dev/ocp-release:4.15.0-multi), as opposed to a by digest image (e.g. quay.io/openshift-release-dev/ocp-release@sha256:b86422e972b9c838dfdb8b481a67ae08308437d6489ea6aaf150242b1d30fa1c), then oc will fail to pull with:

--icsp-file only applies to images referenced by digest and will be ignored for tags

This PR adds some additional information to the SpecSynced condition of the AgentClusterInstall if there was a problem with oc, mirror registries is enabled and the supplied image is in tag format.

List all the issues related to this PR

  • [ ] New Feature
  • [x] Enhancement
  • [ ] Bug fix
  • [ ] Tests
  • [ ] Documentation
  • [ ] CI/CD

What environments does this code impact?

  • [x] Automation (CI, tools, etc)
  • [x] Cloud
  • [x] Operator Managed Deployments
  • [x] None

How was this code tested?

  • [ ] assisted-test-infra environment
  • [ ] dev-scripts environment
  • [ ] Reviewer's test appreciated
  • [x] Waiting for CI to do a full test run
  • [ ] Manual (Elaborate on how it was tested)
  • [x] No tests needed

Checklist

  • [x] Title and description added to both, commit and PR.
  • [x] Relevant issues have been associated (see CONTRIBUTING guide)
  • [x] This change does not require a documentation update (docstring, docs, README, etc)
  • [x] Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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-robot avatar May 06 '24 13:05 openshift-ci-robot

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: paul-maidment

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[bot] avatar May 06 '24 13:05 openshift-ci[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.28%. Comparing base (4577ef6) to head (85a6200). Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6266      +/-   ##
==========================================
- Coverage   68.28%   68.28%   -0.01%     
==========================================
  Files         241      241              
  Lines       35855    35863       +8     
==========================================
+ Hits        24484    24489       +5     
- Misses       9211     9212       +1     
- Partials     2160     2162       +2     
Files Coverage Δ
...oller/controllers/clusterdeployments_controller.go 72.03% <100.00%> (+0.09%) :arrow_up:

... and 3 files with indirect coverage changes

codecov[bot] avatar May 06 '24 14:05 codecov[bot]

/retest

paul-maidment avatar May 06 '24 18:05 paul-maidment

/retest

paul-maidment avatar May 06 '24 22:05 paul-maidment

@paul-maidment: This pull request references MGMT-17194 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 task to target the "4.16.0" version, but no target version was set.

In response to this:

If the user relies on mirror registries, and clusterimageset is set to a tagged image (e.g. quay.io/openshift-release-dev/ocp-release:4.15.0-multi) as opposed to a by digest image (e.g. quay.io/openshift-release-dev/ocp-release@sha256:b86422e972b9c838dfdb8b481a67ae08308437d6489ea6aaf150242b1d30fa1c)

then oc will fail to pull with:

--icsp-file only applies to images referenced by digest and will be ignored for tags

This PR adds some additional information to the SpecSynced condition of the AgentClusterInstall if Mirror Registries is enabled, a tag is detected in the registry reference and there was a problem with oc

This should make it clearer to the user that there might be an issue the tagged image reference.

List all the issues related to this PR

  • [ ] New Feature
  • [x] Enhancement
  • [ ] Bug fix
  • [ ] Tests
  • [ ] Documentation
  • [ ] CI/CD

What environments does this code impact?

  • [x] Automation (CI, tools, etc)
  • [x] Cloud
  • [x] Operator Managed Deployments
  • [x] None

How was this code tested?

  • [ ] assisted-test-infra environment
  • [ ] dev-scripts environment
  • [ ] Reviewer's test appreciated
  • [x] Waiting for CI to do a full test run
  • [ ] Manual (Elaborate on how it was tested)
  • [x] No tests needed

Checklist

  • [x] Title and description added to both, commit and PR.
  • [x] Relevant issues have been associated (see CONTRIBUTING guide)
  • [x] This change does not require a documentation update (docstring, docs, README, etc)
  • [x] Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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-robot avatar May 07 '24 00:05 openshift-ci-robot

/retest

paul-maidment avatar May 08 '24 10:05 paul-maidment

@paul-maidment: all tests passed!

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.

openshift-ci[bot] avatar May 08 '24 10:05 openshift-ci[bot]

/lgtm

tsorya avatar May 08 '24 16:05 tsorya