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
Bug 1745192: configure builds to use mirrors in disconnected enivronments #19
Bug 1745192: configure builds to use mirrors in disconnected enivronments #19
Conversation
|
@gabemontero: GitHub didn't allow me to assign the following users: nalind. Note that only openshift members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
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. |
|
@gabemontero: This pull request references Bugzilla bug 1745192, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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. |
|
Hmm ... doesn't like my combination of WIP and Bug .... /hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this.
I’m afraid correctly handling ICSP, and generating registries.conf, is much more work, and something we should keep consistent throughout the cluster.
Basically some version of https://github.com/openshift/machine-config-operator/blob/cfb78728a6e985fc40a3ef318ba1de359de17a6d/pkg/controller/container-runtime-config/helpers.go#L321 is necessary (providing the docker.io search path[1] configuration either by hard-coding the input, or by changing the API of that function a bit)
So, we should extract that into a separate Go subpackage, and call that both from the machine-config-controller and in here.
Where is the best place for that subpackage to be maintained? In MCO? In here? In some other repository? (I suppose even containers/image would be an option, though importing openshift/api into an otherwise OpenShift-unaware library feels a bit unclean.)
[1] Leaving completely aside whether the node and builder configuration should differ in that aspect. That should be eventually resolved, but that’s not the purpose of this PR.
|
@mtrmac it seems to me that the https://github.com/openshift/machine-config-operator/blob/cfb78728a6e985fc40a3ef318ba1de359de17a6d/pkg/controller/container-runtime-config/helpers.go#L321 code should be moved to https://github.com/openshift/library-go to facilitate the openshift conventions around sharing utilities like this. In general we don't want the openshift ocm-o depending on the mco. Certainly it could be added to library-go first, and then the mco could be subsequently changed to leverage it. Anyway, that is my take on answering your question around where that code should live to be properly shared as you suggested. |
c657448
to
cdd78fb
Compare
|
OK, while certainly not complete from a coding or unit-test perspective, and some specific questions noted with TODO in the implementation, I've updated the PR to hopefully progress the evaluation and discovery of next steps. In particular:
|
cdd78fb
to
a70e6bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work, but I’d very strongly prefer to not maintain the code in two places. (E.g. recent #19 .)
If library-go is the right repo, I’ll prepare a PR for that one.
(I haven’t verified that the copy&pasted code is unmodified.)
a70e6bb
to
0c7cabe
Compare
|
ok I've pushed a new round of updates stemming from @mtrmac 's last set of comments, as well as adding
Assuming we are good with those updates, aside from any new ones that arise independently, we are down to settling on a landing spot for the modified helpers currently residing in MCO, and adjusting the copied code here accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK.
Let me take a stab at the library-go PR later today…
0c7cabe
to
8f146b4
Compare
|
two minor clean up items from @mtrmac pushed @mtrmac - on library-go, I revisited the README to make sure I understood what was involved and now remember the "high bar" warnings about what is required for inclusion. If possible you might want to run the idea by the folks in the OWNERS file and see how amenable they would be before you go too far down this path. If they push back, we'll then need to revisit either
|
In the meantime, I have created openshift/machine-config-operator#1087 . Please check that the proposed API works well. |
|
/retest |
|
the verify-deps failure is some complaints around by glide/vendor bump for container/images starting off tabula rasa / refreshing the bump ... I did it from a copy of my branch and then picked into the version of my branch I pushed ... maybe that had a hiccup |
|
ok |
|
/retest |
|
clean test runs |
|
I’d still much prefer the code to exist in one place, but I’m not sure whether we can make that happen in time. In the meantime, could you apply openshift/machine-config-operator#1082 to this copy, please? |
|
at this point @mtrmac I'd rather see openshift/machine-config-operator#1087 merge and I refactor towards that ... if the library-go attempt gets traction, we can pivot. before we push on that though, let me revisit the "do we need this in 4.2" thread with the various parties I mentioned in your MCO PR and based on the results, go from there |
|
I've sent out an email to the interested parties to get a decision on the risk of merging openshift/machine-config-operator#1087 for 4.2 and then basing this PR off of that |
|
@gabemontero openshift/machine-config-operator#1087 is now LGTM - we'll likely want to copy the code in with the same |
|
Not copy, vendor in and call, please. |
3c30480
to
ab11d79
Compare
|
/hold cancel |
|
OK MCO is vendored in, calling @mtrmac 's new API, and rebased on recent changes from @adambkaplan @adambkaplan bump / PTAL |
|
/retest |
ab11d79
to
a937bf2
Compare
|
ok update pushed for @mtrmac 's #19 (comment) Rationales for not making adjustments for the other 2 posted and he and I have reached consensus to leave as is. @adambkaplan - PTAL |
|
and we have passing test @adambkaplan ... bump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gabemontero nits on log levels. otherwise looks good.
For 4.3 I'd like to see us create a library-go-esque repo to help us generate the essential container runtime config files, since these are used across MCO, builds, and image stream import:
registries.confpolicy.json
|
On Wed, Sep 4, 2019 at 10:55 AM Adam Kaplan ***@***.***> wrote:
***@***.**** requested changes on this pull request.
@gabemontero <https://github.com/gabemontero> nits on log levels.
otherwise looks good.
For 4.3 I'd like to see us create a library-go-esque repo to help us
generate the essential container runtime config files, since these are used
across MCO, builds, and image stream import:
yeah Miloslav and I have talked about that for 4.3
As his library-go PR did not get much traction
…
1. registries.conf
2. policy.json
------------------------------
In pkg/build/controller/build/build_controller.go
<#19 (comment)>
:
> return "", nil
}
klog.V(4).Info("overrode registry settings for builds")
- klog.V(5).Infof("generated registries.conf for build pods: \n%s", string(configTOML))
- return string(configTOML), nil
+ klog.V(0).Infof("generated registries.conf for build pods: \n%s", string(newData.Bytes()))
I would not expect the full registries.conf file to be dumped into normal
logs. Please revert to V(5)
------------------------------
In pkg/build/controller/build/build_controller.go
<#19 (comment)>
:
> if err != nil {
+ klog.V(4).Infof("MCO library had problem building registries config: %s", err.Error())
Use a higher log level for an error - V(0)?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19?email_source=notifications&email_token=AA3NU5C6CGWZFOZN3645FDLQH7D5BA5CNFSM4IPGFO42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCDUIU5Y#pullrequestreview-283675255>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA3NU5FXEMVBE5NDAKAMBGTQH7D5BANCNFSM4IPGFO4Q>
.
|
a937bf2
to
49d04ce
Compare
|
updates pushed @adambkaplan ...PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adambkaplan, gabemontero 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 |
@openshift/openshift-team-developer-experience @bparees @nalind @mtrmac
/assign @adambkaplan
/assign @nalind
/assign @mtrmac
initially marked as WIP because I'm a little unclear on how to fully migrate the build controller's existing representation of
registries.confto use the V2registries.confformat, but I have enough in place I believe to solicit feedback/guidanceUltimately I'll re-enable / add more unit tests once that migration/mapping is sorted out