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

Move from docker.io #8165

Merged

Conversation

edsantiago
Copy link
Member

@edsantiago edsantiago commented Oct 27, 2020

Followon to #7965 (mirror registry). mirror.gcr.io doesn't
cache all the images we need, and I can't find a way to
add to its cache, so let's just use quay.io for those
images that it can't serve.

Tools used:
skopeo copy --all docker://docker.io/library/alpine:3.10.2
docker://quay.io/libpod/alpine:3.10.2

...and also:

docker.io/library/alpine:3.2
docker.io/library/busybox:latest
docker.io/library/busybox:glibc
docker.io/library/busybox:1.30.1
docker.io/library/redis:alpine
docker.io/libpod/alpine-with-bogus-seccomp:label
docker.io/libpod/alpine-with-seccomp:label
docker.io/libpod/alpine_healthcheck:latest
docker.io/libpod/badhealthcheck:latest

Since most of those were new quay.io/libpod images, they required
going in through the quay.io GUI, image, settings, Make Public.

Signed-off-by: Ed Santiago santiago@redhat.com

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 27, 2020
@edsantiago edsantiago changed the title Move from dockerio DO NOT MERGE: Move from dockerio Oct 27, 2020
@edsantiago edsantiago added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Oct 27, 2020
@edsantiago
Copy link
Member Author

Just trying to see what fails in CI, and what I need to focus on.

result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
Expect(len(result.OutputToStringArray())).To(Equal(2))
Expect(len(result.OutputToStringArray())).To(Equal(3))
Copy link
Member Author

Choose a reason for hiding this comment

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

Because nginx was already fetched from quay; and now alpine+busybox are as well.

result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
Expect(result.OutputToString()).To(Equal(cid))
Copy link
Member Author

Choose a reason for hiding this comment

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

I've taken the liberty of making this an actual test, with output checking and all (not just "it exits zero")

Copy link
Member Author

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

I'm getting more and more uncomfortable with this whole situation. Here are some comments about sections I believe need special attention. More later.

Comment on lines +83 to +89
Expect(session.LineInOutputContainsTag("quay.io/libpod/alpine", "latest")).To(BeTrue())
Expect(session.LineInOutputContainsTag("quay.io/libpod/busybox", "latest")).To(BeTrue())
Expect(session.LineInOutputContainsTag("localhost/foo", "a")).To(BeTrue())
Expect(session.LineInOutputContainsTag("localhost/foo", "b")).To(BeTrue())
Expect(session.LineInOutputContainsTag("localhost/foo", "c")).To(BeTrue())
Expect(session.LineInOutputContainsTag("localhost/bar", "a")).To(BeTrue())
Expect(session.LineInOutputContainsTag("localhost/bar", "b")).To(BeTrue())
Copy link
Member Author

Choose a reason for hiding this comment

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

This was a complete NOP. Plus, LineInOutputContainsTag() was broken. See below.

@@ -383,7 +379,10 @@ func tagOutputToMap(imagesOutput []string) map[string]string {
if len(tmp) < 2 {
continue
}
m[tmp[0]] = tmp[1]
Copy link
Member Author

Choose a reason for hiding this comment

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

This was completely broken: for a list containing foo:a, foo:b, foo:c, ... well, you can figure it out.

@@ -383,7 +379,10 @@ func tagOutputToMap(imagesOutput []string) map[string]string {
if len(tmp) < 2 {
continue
}
m[tmp[0]] = tmp[1]
if m[tmp[0]] == nil {
Copy link
Member Author

Choose a reason for hiding this comment

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

WARNING: please review carefully, because I don't speak Golang, and there is almost certainly a more idiomatic way to do this.

@edsantiago
Copy link
Member Author

When I first heard about this mirroring approach, I thought it would be: "we will set up our own mirror, and cache what we need from docker.io".

What I now understand is (and please correct me if I'm wrong): "we will use mirror.gcr.io which is owned and set up by some random party out of our control, and it includes a small handful of the images we need, but not all of them, and we have no way to populate it with what we need, so we have to use quay anyway".

If the latter is true; and given that most of this PR is s/docker/quay/ because the gcr mirror is so useless, should we just skip the mirroring thing entirely and just go full-on with a quay replacement?

@edsantiago
Copy link
Member Author

Well, miracle of miracles, tests are passing. I'm still not sure whether to proceed with a full quay.io replacement, but I would like feedback on this as it is now.

@@ -39,6 +39,7 @@ var _ = Describe("Podman image|container exists", func() {
Expect(session).Should(Exit(0))
})
It("podman image exists in local storage by short name", func() {
Skip("FIXME-8165: shortnames don't seem to work with quay")
Copy link
Member

Choose a reason for hiding this comment

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

This seems... pretty large? Any idea what's going on?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't, not on this or any of the other two FIXMEs. They worry me too, but my goal was to get tests passing and then dive deeper. I lost too much time on the map problem. I can dive deeper into these other problems today, I just want to know if the approach in this PR is reasonable.

Copy link
Member

Choose a reason for hiding this comment

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

I have no issue with the approach - it seems like a quick and easy fix to get things migrated away from Dockerhub.

Copy link
Member Author

Choose a reason for hiding this comment

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

@mheon see #8176. Another one that was unexpectedly difficult to reproduce.

@@ -240,6 +240,7 @@ WORKDIR /test
})

It("podman pull by digest and list --all", func() {
Skip("FIXME-8165: 'rmi -af' fails with 'layer not known'")
Copy link
Member

Choose a reason for hiding this comment

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

This one makes me deeply uncomfortable - it's that easy to break our storage in such a way that we can't fix it with rmi?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was much, much harder to reproduce than I had expected. Added script to #6510 (comment)

@@ -35,7 +35,7 @@ var _ = Describe("Podman image tree", func() {

It("podman image tree", func() {
SkipIfRemote("Does not work on remote client")
dockerfile := `FROM docker.io/library/busybox:latest
dockerfile := `FROM quay.io/libpod/busybox:latest
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we don't have builds that are just using shortnames, not pre-pulled images.

If we completely rip docker.io out of registries.conf, I wonder how much breaks...

Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Followon to containers#7965 (mirror registry). mirror.gcr.io doesn't
cache all the images we need, and I can't find a way to
add to its cache, so let's just use quay.io for those
images that it can't serve.

Tools used:
  skopeo copy --all docker://docker.io/library/alpine:3.10.2 \
                    docker://quay.io/libpod/alpine:3.10.2

...and also:

    docker.io/library/alpine:3.2
    docker.io/library/busybox:latest
    docker.io/library/busybox:glibc
    docker.io/library/busybox:1.30.1
    docker.io/library/redis:alpine
    docker.io/libpod/alpine-with-bogus-seccomp:label
    docker.io/libpod/alpine-with-seccomp:label
    docker.io/libpod/alpine_healthcheck:latest
    docker.io/libpod/badhealthcheck:latest

Since most of those were new quay.io/libpod images, they required
going in through the quay.io GUI, image, settings, Make Public.

Signed-off-by: Ed Santiago <santiago@redhat.com>
@edsantiago edsantiago changed the title DO NOT MERGE: Move from dockerio Move from docker.io Oct 28, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 28, 2020
@edsantiago edsantiago removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 28, 2020
@edsantiago
Copy link
Member Author

@containers/podman-maintainers PTACL ("C" for "Careful"). Some particular points to note:

November 1 is this weekend. I don't think this PR is perfect, but I think it's a major step toward getting our CI to pass once docker cuts us off.

I will be out all of tomorrow (Thursday) with no means of communication. I will likely check in Friday morning but cannot promise a full day at work.

@rhatdan
Copy link
Member

rhatdan commented Oct 29, 2020

LGTM
@containers/podman-maintainers PTAL
I wonder if we should add a job that looks for docker.io in PRs for tests, to make sure they don't leak back in.

@vrothberg
Copy link
Member

LGTM
@containers/podman-maintainers PTAL
I wonder if we should add a job that looks for docker.io in PRs for tests, to make sure they don't leak back in.

That can't happen in the e2e tests (see 53fe386) as references to docker.io will either go to the gcr mirror or quay.io/libpod.

LGTM but a third pair of eyes would be appreciated before merging

@@ -39,6 +39,7 @@ var _ = Describe("Podman image|container exists", func() {
Expect(session).Should(Exit(0))
})
It("podman image exists in local storage by short name", func() {
Skip("FIXME-8165: shortnames don't seem to work with quay (#8176)")
Copy link
Member

Choose a reason for hiding this comment

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

@vrothberg FYI for short names work

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, Tom!

Copy link
Member Author

Choose a reason for hiding this comment

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

@TomSweeneyRedHat @vrothberg late followup: this does not seem to be related to shortnames. #8176 is too weird for me to describe in a helpful title.

@@ -59,7 +59,7 @@ WantedBy=multi-user.target
Expect(stop.ExitCode()).To(Equal(0))
}()

create := podmanTest.Podman([]string{"create", "--name", "redis", "redis"})
create := podmanTest.Podman([]string{"create", "--name", "redis", redis})
Copy link
Member

Choose a reason for hiding this comment

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

Just double-checking is removing the quotes here intended/valid?

Copy link
Member

Choose a reason for hiding this comment

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

should be yes

Copy link
Member Author

Choose a reason for hiding this comment

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

@TomSweeneyRedHat @baude, late followup, yes, unquoting "redis" is deliberate: that gives us a variable that references an FQIN.

@TomSweeneyRedHat
Copy link
Member

Just one question, otherwise LGTM and it's all green. I'm fine with merging now and fixing later if necessary.

@baude
Copy link
Member

baude commented Oct 29, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 29, 2020
@openshift-merge-robot openshift-merge-robot merged commit 6d72e76 into containers:master Oct 29, 2020
@edsantiago edsantiago deleted the move_from_dockerio branch November 1, 2020 17:28
@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 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 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.

9 participants