Skip to content

integration: set custom flags for dockerd worker#3612

Merged
tonistiigi merged 2 commits into
moby:masterfrom
crazy-max:itg-dockerd-flags
Feb 11, 2023
Merged

integration: set custom flags for dockerd worker#3612
tonistiigi merged 2 commits into
moby:masterfrom
crazy-max:itg-dockerd-flags

Conversation

@crazy-max
Copy link
Copy Markdown
Member

@crazy-max crazy-max commented Feb 9, 2023

Setting bip and default address pool might not be necessary when testing locally but is useful when running on GitHub Runners to avoid overlapping with others on this address space: https://github.com/moby/moby/blob/3ba527d82af53cf752aa6ec39daac14626c41b0f/libnetwork/ipamutils/utils.go#L18-L20

Needs follow-up on moby to set the right env in: https://github.com/moby/moby/blob/3ba527d82af53cf752aa6ec39daac14626c41b0f/.github/workflows/buildkit.yml#L105-L110

Signed-off-by: CrazyMax crazy-max@users.noreply.github.com

@crazy-max
Copy link
Copy Markdown
Member Author

crazy-max commented Feb 9, 2023

While testing this change, found out we have TestIntegration/TestSecretMounts/worker=dockerd that fails with latest changes from master: https://github.com/crazy-max/buildkit/actions/runs/4135974815/jobs/7149222126#step:8:2620

=== CONT  TestIntegration/TestSecretMounts/worker=dockerd
    client_test.go:1153: 
        	Error Trace:	/src/client/client_test.go:1153
        	            				/src/client/run.go:88
        	            				/src/client/run.go:197
        	Error:      	Received unexpected error:
        	            	process "test ! -f /run/secrets/mysecret2" did not complete successfully: exit code: 1
        	            	github.com/moby/buildkit/util/stack.Enable
        	            		/src/util/stack/stack.go:77
        	            	github.com/moby/buildkit/util/grpcerrors.FromGRPC
        	            		/src/util/grpcerrors/grpcerrors.go:197
        	            	github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor
        	            		/src/util/grpcerrors/intercept.go:41
        	            	google.golang.org/grpc.(*ClientConn).Invoke
        	            		/src/vendor/google.golang.org/grpc/call.go:35
        	            	github.com/moby/buildkit/api/services/control.(*controlClient).Solve
        	            		/src/api/services/control/control.pb.go:2208
        	            	github.com/moby/buildkit/client.(*Client).solve.func2
        	            		/src/client/solve.go:258
        	            	golang.org/x/sync/errgroup.(*Group).Go.func1
        	            		/src/vendor/golang.org/x/sync/errgroup/errgroup.go:75
        	            	runtime.goexit
        	            		/usr/local/go/src/runtime/asm_amd64.s:1594
        	            	failed to solve
        	            	github.com/moby/buildkit/client.(*Client).solve.func2
        	            		/src/client/solve.go:273
        	            	golang.org/x/sync/errgroup.(*Group).Go.func1
        	            		/src/vendor/golang.org/x/sync/errgroup/errgroup.go:75
        	            	runtime.goexit
        	            		/usr/local/go/src/runtime/asm_amd64.s:1594
        	Test:       	TestIntegration/TestSecretMounts/worker=dockerd
    sandbox.go:264: stdout: /usr/bin/dockerd
    sandbox.go:267: tmpfs on /run/secrets/mysecret type tmpfs (ro,nosuid,nodev,noexec,relatime,inode64)
    sandbox.go:264: stderr: /usr/bin/dockerd
    sandbox.go:267: > startCmd 2023-02-09 16:06:55.229863501 +0000 UTC m=+249.307224537 /usr/bin/dockerd --data-root /tmp/integration2604706285/dyoeomnwwkfrr/root --exec-root /tmp/dxr/dyoeomnwwkfrr --pidfile /tmp/integration2604706285/dyoeomnwwkfrr/docker.pid --containerd-namespace dyoeomnwwkfrr --containerd-plugins-namespace dyoeomnwwkfrrp --host unix:///tmp/docker-integration/dyoeomnwwkfrr.sock --config-file /tmp/integration2604706285/daemon.json --userland-proxy=false --debug --bip=10.66.66.1/24 --default-address-pool=base=10.66.66.0/16,size=24
    sandbox.go:267: time="2023-02-09T16:06:55.279321453Z" level=info msg="Starting up"

@tonistiigi I wonder if #3561 needs changes on moby too? (maybe not yet vendored)

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@tonistiigi tonistiigi merged commit 2d4222b into moby:master Feb 11, 2023
@crazy-max crazy-max deleted the itg-dockerd-flags branch February 11, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants