Skip to content

Modify ImageContentSourcePolicy to distinguish between sources (pull specs) and mirrors#384

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
mtrmac:icsp-explicit-source
Jul 18, 2019
Merged

Modify ImageContentSourcePolicy to distinguish between sources (pull specs) and mirrors#384
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
mtrmac:icsp-explicit-source

Conversation

@mtrmac
Copy link
Copy Markdown
Contributor

@mtrmac mtrmac commented Jul 17, 2019

Note: This modifies an already committed type. Is that OK?

The current ImageContentSourcePolicy does not scale well when a large set of sources are all mirrored into a single mirror repository; in that case they are all considered to be possible mirrors of each other (in some order), and referring any of them could cause all of the others to be accessed (taking a long time to search through them, especially if they were firewall off and had to time out).

Instead, make an explicit distinction between sources (where images come from, and which appear in pull specs) and mirrors (where images are copied to, an infrastructure concept invisible to most of the cluster, which only refers to the sources).

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 17, 2019
@mtrmac
Copy link
Copy Markdown
Contributor Author

mtrmac commented Jul 17, 2019

/hold

... for discussion. @smarterclayton @umohnani8 @abhinavdahiya PTAL.

This is a follow-up to #354.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 17, 2019
Comment thread operator/v1alpha1/types_image_content_source_policy.go Outdated
// +required
Source string `json:"source"`
// mirrors is one or more repositories that may also contain the same images.
// Each mirror is tried in the order specified here* , and before the original “source”, which is contacted last.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't want to enshrine the "contacted last" into the API guarantee. You need to weaken this statement a bit, possibly:

The order of mirrors in this list is treated as the user's desired priority, while source is by default considered lower priority than all mirrors. Other cluster configuration may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated to that text (and weaved in a note about conflicting repositoryDigestMirrors).

@mtrmac mtrmac force-pushed the icsp-explicit-source branch from f371d86 to 88da2fa Compare July 17, 2019 20:18
@smarterclayton
Copy link
Copy Markdown
Contributor

This looks good to me (see my comment). It's ok to break this field but we may need to stage the changes with installer (or have installer temporarily disable setting this field).

Will let others review but I think this is a better API than before, and I would expect it to be mirrored into install-config unless issues are discovered that would counter that (let's have that discussion here)

@smarterclayton
Copy link
Copy Markdown
Contributor

Note that if we do merge this we need to communicate to everyone that we will be breaking the API within the master branch and the timeframe for the fixes landing, so that teams aren't held up by being unable to vendor their code.

@mtrmac mtrmac force-pushed the icsp-explicit-source branch from 88da2fa to 5a97de7 Compare July 17, 2019 20:20
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 17, 2019
@mrunalp
Copy link
Copy Markdown
Member

mrunalp commented Jul 17, 2019

👍

@smarterclayton
Copy link
Copy Markdown
Contributor

Waiting for Abhinav feedback

Comment thread operator/v1alpha1/types_image_content_source_policy.go
@mtrmac mtrmac force-pushed the icsp-explicit-source branch from 5a97de7 to 7076b89 Compare July 17, 2019 22:18
…specs) and mirrors

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@abhinavdahiya
Copy link
Copy Markdown
Contributor

The API looks sound. I can stage changes in installer based on this bump...

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 17, 2019
@mtrmac
Copy link
Copy Markdown
Contributor Author

mtrmac commented Jul 17, 2019

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 17, 2019
@mrunalp
Copy link
Copy Markdown
Member

mrunalp commented Jul 17, 2019

/approve

@mrunalp
Copy link
Copy Markdown
Member

mrunalp commented Jul 17, 2019

@abhinavdahiya @smarterclayton We need approve from you :)

@umohnani8
Copy link
Copy Markdown
Contributor

LGTM. @smarterclayton needs an approve label

@smarterclayton
Copy link
Copy Markdown
Contributor

/approve

@openshift-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, mrunalp, mtrmac, smarterclayton

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

The pull request process is described here

Details 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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 18, 2019
@openshift-merge-robot openshift-merge-robot merged commit 9525304 into openshift:master Jul 18, 2019
@mtrmac mtrmac deleted the icsp-explicit-source branch July 18, 2019 18:48
openshift-merge-robot added a commit to openshift/cluster-config-operator that referenced this pull request Jul 23, 2019
Generate operator/v1alpha1 CRDs, update for openshift/api#384
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants