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

Plugin tests pull from Hub #30626

Open
aaronlehmann opened this issue Feb 1, 2017 · 6 comments
Open

Plugin tests pull from Hub #30626

aaronlehmann opened this issue Feb 1, 2017 · 6 comments
Labels
area/plugins area/testing kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.

Comments

@aaronlehmann
Copy link
Contributor

aaronlehmann commented Feb 1, 2017

I noticed that the plugin integration tests install plugins from the Hub:

pName             = "tiborvass/sample-volume-plugin"
pTag              = "latest"
pNameWithTag      = pName + ":" + pTag

...

func (s *DockerSuite) TestPluginBasicOps(c *check.C) {
        testRequires(c, DaemonIsLinux, IsAmd64, Network)
        _, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
        c.Assert(err, checker.IsNil)
...

I see a few problems with this:

  • Use of the Hub means a service outage or transient network issue will make the test appear flaky. We've had this problem with some pull tests before, and have tried to use a local registry instead wherever possible.
  • If the plugin is updated on Hub to an incompatible version, it will break integration tests for older versions of Docker.
  • The plugin is installed with full privileges, so a compromise of this Hub account can lead to root access on any machine that runs the integration tests.
  • It's a waste of bandwidth to pull the plugins from the internet every time a test which uses them runs.

I think it would be a lot better to bake the plugins into the Docker image and serve them from a local registry.

cc @tiborvass @tonistiigi @vdemeester @anusha-ragunathan

@vdemeester vdemeester added area/testing area/plugins kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. labels Feb 1, 2017
@vdemeester
Copy link
Member

@aaronlehmann defenitely agreeing with you. I think we should do the same as we are doing for most of the image used in the integration test, i.e. pre-fetching or creating a plugin (or a bunch of them) so that we don't need to pull them.

@vdemeester vdemeester self-assigned this Feb 1, 2017
@aaronlehmann
Copy link
Contributor Author

I also noticed that TestDaemonNoSpaceLeftOnDeviceError tries to pull registry:2 from Hub.

@aaronlehmann aaronlehmann changed the title Plugin tests pull from hub Plugin tests pull from Hub Feb 2, 2017
@aaronlehmann
Copy link
Contributor Author

Another similar issue in https://jenkins.dockerproject.org/job/Docker-PRs/41506/console:

18:58:22 FAIL: docker_cli_plugins_logdriver_test.go:10: DockerSuite.TestPluginLogDriver
18:58:22 
18:58:22 docker_cli_plugins_logdriver_test.go:15:
18:58:22     dockerCmd(c, "plugin", "install", pluginName)
18:58:22 /go/src/github.com/docker/docker/pkg/testutil/cmd/command.go:64:
18:58:22     t.Fatalf("at %s:%d - %s", filepath.Base(file), line, err.Error())
18:58:22 ... Error: at cli.go:47 - 
18:58:22 Command:  /go/src/github.com/docker/docker/bundles/17.05.0-ce-rc1/binary-client/docker plugin install cpuguy83/docker-logdriver-test:latest
18:58:22 ExitCode: 1
18:58:22 Error:    exit status 1
18:58:22 Stdout:   latest: Pulling from cpuguy83/docker-logdriver-test
18:58:22 
18:58:22 Stderr:   error pulling image configuration: Get https://dseasb33srnrn.cloudfront.net/registry-v2/docker/registry/v2/blobs/sha256/e0/e0dc5bbec53cf81e83c3063d30dfa8307a96145ccf3abc6ab2d381b80e60abac/data?Expires=1492024702&Signature=b8NgTMrtBSEMLrWVoTTLzY1vhxBh70Fyp7Y~CPwB~GQDDxwZONpULJ8Mwe75YnX3J09NGAnBynuKxpjyEtU04mgrepkInhWay12RvJfoww1gM6NEgB2ceCZGJc29rl8m~UofUqN7LZghUs8g7Rhofx~cRqBfojWArScfIWuSCtQ_&Key-Pair-Id=APKAJECH5M7VWIS5YZ6Q: read tcp 172.17.0.2:51129->52.84.50.134:443: read: connection reset by peer

@aaronlehmann aaronlehmann mentioned this issue Jun 8, 2017
5 tasks
@vdemeester
Copy link
Member

Should be closed by #34085 right ?

@thaJeztah
Copy link
Member

I think so; let me close, but happy to reopen if we missed some @aaronlehmann

@cpuguy83
Copy link
Member

Well, there's still some more to do, namely any plugins that are actually testing a subsystem are still pulled from hub.

@cpuguy83 cpuguy83 reopened this Jul 18, 2017
@vdemeester vdemeester removed their assignment Jan 4, 2018
@thaJeztah thaJeztah added this to To do in Improving CI Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins area/testing kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.
Projects
Improving CI
  
To do
Development

No branches or pull requests

5 participants
@vdemeester @cpuguy83 @thaJeztah @aaronlehmann and others