Skip to content

Conversation

@mtrmac
Copy link
Contributor

@mtrmac mtrmac commented Dec 3, 2018

This updates c/image to include containers/image#468 , buildah to include containers/buildah#1214, and updates the callers.

In addition to the straightforward API change, it also rips out the existing code manually handling the list of insecure registries; this should now be handled by the docker:// transport.

See the individual commit messages for details.

The way types.SystemContext.SystemRegistriesConfPath is set continues to be fairly irregular, only at the places that immediately need it; this really feels like something that should be set in one (and no more than one) shared helper, and types.SystemContext values should be passed along either the call stack or the data structures (Runtime?); this PR only makes a localized transition, admits to it via added FIXMEs, and does not have the ambition to rework the SystemContext use at all.

Warning: I haven’t tested this manually one bit.

This is a prerequisite to merging the blob-info-caching branch.

@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 3, 2018
@mtrmac mtrmac force-pushed the sysregistriesv2 branch 3 times, most recently from 1022f43 to 9ef5816 Compare December 4, 2018 13:28
@vrothberg
Copy link
Member

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrothberg

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 Dec 4, 2018
@vrothberg
Copy link
Member

/test images

Copy link
Member

Choose a reason for hiding this comment

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

previously the REGISTRIES_CONFIG_PATH environment variable was honored also for the rootless case.

It is probably enough to change the order of the checks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, thanks for catching this. Should be fixed now.

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.

Just minor nits. Thanks for the nice PR! Especially for breaking the PR up into easier to digest pieces.

Copy link
Member

Choose a reason for hiding this comment

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

s/used,/used./

Copy link
Member

Choose a reason for hiding this comment

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

If set to false + "," + then

Copy link
Member

Choose a reason for hiding this comment

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

Same for docs/podman-push.1.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated all 5 man pages with --tls-verify similarly.

Copy link
Member

Choose a reason for hiding this comment

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

An idea for future work, orthogonal to this PR: maybe a (OptinalBoolFalse).IsFalse() method would be nice. Same for IsTrue().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(Or, maybe, at a higher level, something roughly like TLSVerificationDisabled, to also clarify he double negatives in SkipVerify…. And, independently, in podman, a shared helper for the !c.BoolT("tls-verify") to make sure there can’t be simple typos… — or, ultimately, a CLI rework that does not rely on the "tis-verify" string.

Luckily, this particular line was completely removed in one of the next commits, in favor of sysregistriesv2 doing the right thing, and no check of an optional boolean is the best kind of check of an optional boolean :) )

@rh-atomic-bot
Copy link
Collaborator

☔ The latest upstream changes (presumably #1932) made this pull request unmergeable. Please resolve the merge conflicts.

@rhatdan
Copy link
Member

rhatdan commented Dec 5, 2018

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 5, 2018
@rhatdan
Copy link
Member

rhatdan commented Dec 5, 2018

Nice work @mtrmac and @vrothberg

@rh-atomic-bot
Copy link
Collaborator

☔ The latest upstream changes (presumably #1924) made this pull request unmergeable. Please resolve the merge conflicts.

@rhatdan
Copy link
Member

rhatdan commented Dec 6, 2018

@mtrmac Needs a rebase.

@openshift-ci-robot openshift-ci-robot added size/XL and removed lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 6, 2018
@rh-atomic-bot
Copy link
Collaborator

☔ The latest upstream changes (presumably #1946) made this pull request unmergeable. Please resolve the merge conflicts.

@mtrmac mtrmac force-pushed the sysregistriesv2 branch 2 times, most recently from 042ff83 to 0794d52 Compare December 6, 2018 17:07
@mtrmac
Copy link
Contributor Author

mtrmac commented Dec 6, 2018

Rebased, tests are passing.

@rh-atomic-bot
Copy link
Collaborator

☔ The latest upstream changes (presumably #1905) made this pull request unmergeable. Please resolve the merge conflicts.

@rhatdan
Copy link
Member

rhatdan commented Dec 6, 2018

@mtrmac Sadly we got a conflict.

mtrmac added 12 commits December 6, 2018 23:31
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This updates buildah for the sysregistriesv2 changes.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
... instead of unnecessarily adapting it for the DockerInsecureSkipTLSVerify type change.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Unrelated to the rest of the PR.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Following SystemContext.DockerInsecureSkipTLSVerify, make the
DockerRegistryOne also an OptionalBool, and update callers.

Explicitly document that --tls-verify=true and --tls-verify unset
have different behavior in those commands where the behavior changed
(or where it hasn't changed but the documentation needed updating).

Also make the --tls-verify man page sections a tiny bit more consistent
throughout.

This is a minimal fix, without changing the existing "--tls-verify=true"
paths nor existing manual insecure registry lookups.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
DockerRegistryOptions.DockerInsecureSkipTLSVerify as an types.OptionalBool
can now represent that value, so forceSecure is redundant.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
The newly introduced SystemRegistriesConfPath somewhat decreases
duplication, but more importantly will allow future callers to
set just a types.SystemContext.SystemRegistriesConfPath and not call
GetRegistries / GetInsecureRegistries at all.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Instead, just set SystemRegistriesConfPath and let the transport do it.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
DockerRegistryOptions.DockerInsecureSkipTLSVerify as an types.OptionalBool
can now represent that value, so forceSecure is redundant.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Instead, just set SystemRegistriesConfPath and let the transport do it.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
i.e. actually reflect the environment variable and/or rootless mode
instead of always using the default path.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Instead, just set SystemRegistriesConfPath and let the transport do it.

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

mtrmac commented Dec 6, 2018

Rebased again; non-Linux builds are broken, so absolutely untested – not even that it compiles.

@mtrmac
Copy link
Contributor Author

mtrmac commented Dec 6, 2018

Tests are passing. PTAL

@mheon
Copy link
Member

mheon commented Dec 6, 2018

LGTM

@mheon
Copy link
Member

mheon commented Dec 6, 2018

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 6, 2018
@openshift-merge-robot openshift-merge-robot merged commit a387c72 into containers:master Dec 6, 2018
@mtrmac mtrmac deleted the sysregistriesv2 branch December 6, 2018 23:31
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants