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

[1.20] pull: do check for blocked registries #5034

Merged

Conversation

haircommander
Copy link
Member

Do not check whether a registry is blocked. c/image is taking care of
that implicitly when attempting to copy an image.

Signed-off-by: Valentin Rothberg rothberg@redhat.com

What type of PR is this?

/kind bug

What this PR does / why we need it:

or else mirrored registries cannot resolve there

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix a bug where CRI-O prematurely stopped pulling from a blocked registry, even if there was a mirror for that registry it was allowed to pull from.

Do not check whether a registry is blocked.  c/image is taking care of
that implicitly when attempting to copy an image.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jun 25, 2021
@openshift-ci openshift-ci bot requested a review from sboeuf June 25, 2021 16:20
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 25, 2021
@haircommander
Copy link
Member Author

/cc @mtrmac @vrothberg

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 25, 2021

@haircommander: GitHub didn't allow me to request PR reviews from the following users: mtrmac.

Note that only cri-o members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @mtrmac @vrothberg

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.

@openshift-ci openshift-ci bot requested a review from vrothberg June 25, 2021 16:20
@haircommander
Copy link
Member Author

/retest
/cherry-pick release-1.19

@openshift-cherrypick-robot

@haircommander: once the present PR merges, I will cherry-pick it on top of release-1.19 in a new PR and assign it to you.

In response to this:

/retest
/cherry-pick release-1.19

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.

Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

.Blocked is also evaluated below in the unqualified-image case. I feel quite strongly that the two should behave the same.


IIRC this behavior difference was historically known when implementing the c/image approach, and the CRI-O code here was left around intentionally at that time, though I’m not 100% certain and I might be misremembering. Is there a specific rationale for either that old decision, or the new decision?

(OTOH I don’t feel strongly about preserving this behavior at all, I’m happy to defer decisions about CRI-O behavior stability to CRI-O maintainers. “The code will be simpler and consistent with other c/image users” might be a perfectly good justification.)

...for the unqualified registry use-case, as c/image can calculate it

Signed-off-by: Peter Hunt <pehunt@redhat.com>
Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

Thanks! Code LGTM, decision whether to change the behavior is up to you.

@haircommander
Copy link
Member Author

.Blocked is also evaluated below in the unqualified-image case. I feel quite strongly that the two should behave the same.

IIRC this behavior difference was historically known when implementing the c/image approach, and the CRI-O code here was left around intentionally at that time, though I’m not 100% certain and I might be misremembering. Is there a specific rationale for either that old decision, or the new decision?

(OTOH I don’t feel strongly about preserving this behavior at all, I’m happy to defer decisions about CRI-O behavior stability to CRI-O maintainers. “The code will be simpler and consistent with other c/image users” might be a perfectly good justification.)

My updating this code was mostly because the current behavior wrt the interaction of blocked and mirrored registries is not intuitive to me. I am not married to defering the decision to c/image, but "simpler and consistent" are both also good reasons to do so :)

I removed the .Blocked handling below as well

@mtrmac
Copy link
Contributor

mtrmac commented Jun 25, 2021

My updating this code was mostly because the current behavior wrt the interaction of blocked and mirrored registries is not intuitive to me.

The concept of blocking was created before c/image was aware of it, and IIRC before mirrors were a thing. So it’s quite possible that this before-mirror blocking was just inherited after mirrors, and left around because nobody wanted to affirmatively decide make a change to the behavior, i.e. this might have never been a conscious decision.

@haircommander
Copy link
Member Author

/retest

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

@haircommander
Copy link
Member Author

@saschagrunert ptal

Copy link
Member

@saschagrunert saschagrunert 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 openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 28, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 28, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, saschagrunert, vrothberg

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 [haircommander,saschagrunert,vrothberg]

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

@openshift-merge-robot openshift-merge-robot merged commit 41925ef into cri-o:release-1.20 Jun 28, 2021
@openshift-cherrypick-robot

@haircommander: new pull request created: #5040

In response to this:

/retest
/cherry-pick release-1.19

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.

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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants