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

e2e-local "image update" in catalog_e2e_test.go fails #2420

Closed
akihikokuroda opened this issue Oct 12, 2021 · 6 comments · Fixed by #2445
Closed

e2e-local "image update" in catalog_e2e_test.go fails #2420

akihikokuroda opened this issue Oct 12, 2021 · 6 comments · Fixed by #2445
Assignees
Labels
kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test.

Comments

@akihikokuroda
Copy link
Member

Bug Report

make e2e-local TEST='image update fails with the following message.

Catalog represents a store of bundles which OLM can use to install Operators
/Users/akihikokuroda/development/go/src/operator-lifecycle-manager/test/e2e/catalog_e2e_test.go:35
  image update [It]
  /Users/akihikokuroda/development/go/src/operator-lifecycle-manager/test/e2e/catalog_e2e_test.go:639

  error copying old registry file: failed to exec []string{"skopeo", "--debug", "--insecure-policy=true", "copy", "--dest-tls-verify=false", "--format=v2s2", "--dest-no-creds=true", "docker://quay.io/olmtest/catsrc-update-test:old", "docker://localhost:5000/catsrc-update:xgl57x"}: exit status 1
  Unexpected error:
      <*errors.errorString | 0xc002071410>: {
          s: "failed to exec []string{\"skopeo\", \"--debug\", \"--insecure-policy=true\", \"copy\", \"--dest-tls-verify=false\", \"--format=v2s2\", \"--dest-no-creds=true\", \"docker://quay.io/olmtest/catsrc-update-test:old\", \"docker://localhost:5000/catsrc-update:xgl57x\"}: exit status 1",
      }
      failed to exec []string{"skopeo", "--debug", "--insecure-policy=true", "copy", "--dest-tls-verify=false", "--format=v2s2", "--dest-no-creds=true", "docker://quay.io/olmtest/catsrc-update-test:old", "docker://localhost:5000/catsrc-update:xgl57x"}: exit status 1
  occurred

  /Users/akihikokuroda/development/go/src/operator-lifecycle-manager/test/e2e/catalog_e2e_test.go:684

What did you do?
Executed make e2e-local TEST='image update

What did you expect to see?

It completes successfully without error.

What did you see instead? Under which circumstances?
Error:

Catalog represents a store of bundles which OLM can use to install Operators
/Users/akihikokuroda/development/go/src/operator-lifecycle-manager/test/e2e/catalog_e2e_test.go:35
  image update [It]
  /Users/akihikokuroda/development/go/src/operator-lifecycle-manager/test/e2e/catalog_e2e_test.go:639

  error copying old registry file: failed to exec []string{"skopeo", "--debug", "--insecure-policy=true", "copy", "--dest-tls-verify=false", "--format=v2s2", "--dest-no-creds=true", "docker://quay.io/olmtest/catsrc-update-test:old", "docker://localhost:5000/catsrc-update:xgl57x"}: exit status 1
  Unexpected error:
      <*errors.errorString | 0xc002071410>: {
          s: "failed to exec []string{\"skopeo\", \"--debug\", \"--insecure-policy=true\", \"copy\", \"--dest-tls-verify=false\", \"--format=v2s2\", \"--dest-no-creds=true\", \"docker://quay.io/olmtest/catsrc-update-test:old\", \"docker://localhost:5000/catsrc-update:xgl57x\"}: exit status 1",
      }
      failed to exec []string{"skopeo", "--debug", "--insecure-policy=true", "copy", "--dest-tls-verify=false", "--format=v2s2", "--dest-no-creds=true", "docker://quay.io/olmtest/catsrc-update-test:old", "docker://localhost:5000/catsrc-update:xgl57x"}: exit status 1
  occurred

  /Users/akihikokuroda/development/go/src/operator-lifecycle-manager/test/e2e/catalog_e2e_test.go:684

Environment

  • operator-lifecycle-manager version:
    Local system is MAC.
    Running agains latest master. commit id : 4c3c8f1

  • Kubernetes version information:

  • Kubernetes cluster kind: kind version 0.11.1

Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:23:52Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-21T23:01:33Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}

Possible Solution

I tried to make it work but so far I couldn't.

Additional context

The port-forwarding here probably doesn't work because the context for the kubectl port-forward is not the context of the e2e text execution..

@akihikokuroda akihikokuroda added the kind/bug Categorizes issue or PR as related to a bug. label Oct 12, 2021
@timflannagan timflannagan mentioned this issue Oct 13, 2021
43 tasks
@dinhxuanvu dinhxuanvu added the triaged Issue has been considered by a member of the OLM community label Oct 14, 2021
@exdx
Copy link
Member

exdx commented Oct 14, 2021

Hi @akihikokuroda, this is a known issue with this test, specifically on kind clusters. The test does pass on minikube however (provided skopeo is installed locally). Currently on our upstream CI this test is skipped, due to the known issue with kind, and downstream it runs differently.

It's not clear how much value there is in getting this test to run in kind and whether it will actually work due to the dependency on an image registry being locally accessible. A solution could be to skip the test if running in kind.

@akihikokuroda
Copy link
Member Author

@exdx Thanks for explanations. It seems that some issues or restrictions in kind cluster. I believe that making skip this test in kind cluster is better than fail always.

@akihikokuroda
Copy link
Member Author

@exdx How can I run the e2e-local with minikube? I don't see any instructions here: https://github.com/operator-framework/operator-lifecycle-manager/blob/master/test/e2e/README.md. Do I have to just set the minikube context as the default context by the kubectl config use-context?

@exdx
Copy link
Member

exdx commented Oct 14, 2021

Yes, I think that should work. We supported minikube in the past but recently switched entirely to kind. I setup a minikube instance manually and run make run-local to deploy OLM, then target the specific test via ginkgo.

GO111MODULE=on GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/ginkgo -focus "image update" -v --progress ./test/e2e -- -namespace=operators -olmNamespace=olm -dummyImage=bitnami/nginx:latest

@exdx
Copy link
Member

exdx commented Oct 14, 2021

I'm not sure why it works with minikube (with the docker driver) and does not with kind. They are both running containerized versions of the cluster so should behave similarly.

@akihikokuroda
Copy link
Member Author

With kind, the test creates a new kind cluster and it doesn't change the default context so the 'kubectl port-forwad` don't work for the test cluster. I also workaounded the port-forward issue but the creation of the registry pod could not pull the image from the image registry pod. I guess that that's a kind cluster.

Would you put the way to run the test with minikube in the /test/e2e/README.md?

Thanks!

@timflannagan timflannagan added kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. and removed kind/bug Categorizes issue or PR as related to a bug. triaged Issue has been considered by a member of the OLM community labels Nov 9, 2021
@dinhxuanvu dinhxuanvu added triaged Issue has been considered by a member of the OLM community and removed triaged Issue has been considered by a member of the OLM community labels Nov 11, 2021
@timflannagan timflannagan linked a pull request Nov 12, 2021 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test.
Projects
None yet
4 participants