Commit Graph

1293 Commits (a9fe50acf16dd05d1f9877b27068884543ad7a1f)

Author SHA1 Message Date
Tonis Tiigi 96f24ca7bb executor: improve hosts cleanup
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-03 14:01:54 -07:00
Tonis Tiigi f8b0573edb dockerfile: expose add-hosts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-03 13:56:14 -07:00
Tonis Tiigi bf29f5bd3b client: add test for extra hosts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-03 13:56:13 -07:00
Tonis Tiigi f7359f7093 llb: add extrahost support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-03 13:56:13 -07:00
Tonis Tiigi 4945fe758c llbsolver: add support for extra host records
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-03 13:56:13 -07:00
Tõnis Tiigi 7e98ece83d
Merge pull request #555 from ijc/exporter-panic
solver: avoid dereferencing nil res.Metadata
2018-08-03 13:15:52 -07:00
Ian Campbell f7937f1989 solver: avoid dereferencing nil res.Metadata
I saw this:
    panic: assignment to entry in nil map

    goroutine 3173 [running]:
    github.com/moby/buildkit/exporter/oci.(*imageExporterInstance).Export(0xc42094ac40, 0xecac60, 0xc4211ca690, 0xed12c0, 0xc42000fca8, 0x0, 0x0, 0x0, 0x0, 0x0)
    	/go/src/github.com/moby/buildkit/exporter/oci/export.go:113 +0x156
    github.com/moby/buildkit/solver/llbsolver.(*Solver).Solve.func2(0xecac60, 0xc4211ca690, 0xc4202207c0, 0x0)
    	/go/src/github.com/moby/buildkit/solver/llbsolver/solver.go:132 +0x7d
    github.com/moby/buildkit/solver/llbsolver.inVertexContext(0xecac60, 0xc4211ca690, 0xe2ec38, 0x1d, 0xc420d43400, 0x0, 0x0)
    	/go/src/github.com/moby/buildkit/solver/llbsolver/solver.go:203 +0x1f6
    github.com/moby/buildkit/solver/llbsolver.(*Solver).Solve(0xc4203f7dc0, 0xecac60, 0xc420deb830, 0xc4203ed200, 0x19, 0xc4202ff840, 0x0, 0x0, 0x0, 0x0, ...)
    	/go/src/github.com/moby/buildkit/solver/llbsolver/solver.go:131 +0x761
    github.com/moby/buildkit/control.(*Controller).Solve(0xc42017e870, 0xecac60, 0xc420deb830, 0xc4201edd40, 0xc42017e870, 0x1, 0x1)
    	/go/src/github.com/moby/buildkit/control/control.go:207 +0x4b8
    github.com/moby/buildkit/api/services/control._Control_Solve_Handler.func1(0xecac60, 0xc420deb800, 0xde2180, 0xc4201edd40, 0xecac60, 0xc420deb800, 0xed67a0, 0x1595288)
    	/go/src/github.com/moby/buildkit/api/services/control/control.pb.go:810 +0x86
    github.com/moby/buildkit/vendor/github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0xecac60, 0xc420deb800, 0xde2180, 0xc4201edd40, 0xc4202ff9e0, 0xc4202ffa00, 0x0, 0x0, 0xebbea0, 0xc420188310)
    	/go/src/github.com/moby/buildkit/vendor/github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc/server.go:57 +0x2ba
    main.unaryInterceptor.func1(0xecaba0, 0xc4206afe40, 0xde2180, 0xc4201edd40, 0xc4202ff9e0, 0xc4202ffa00, 0x0, 0x0, 0x0, 0x0)
    	/go/src/github.com/moby/buildkit/cmd/buildkitd/main.go:330 +0x15f
    github.com/moby/buildkit/api/services/control._Control_Solve_Handler(0xd76a00, 0xc42017e870, 0xecac60, 0xc420deb530, 0xc42028d030, 0xc420450760, 0x0, 0x0, 0x34, 0x3)
    	/go/src/github.com/moby/buildkit/api/services/control/control.pb.go:812 +0x167
    github.com/moby/buildkit/vendor/google.golang.org/grpc.(*Server).processUnaryRPC(0xc420244700, 0xed39c0, 0xc420694000, 0xc420671680, 0xc420497650, 0x152cef8, 0x0, 0x0, 0x0)
    	/go/src/github.com/moby/buildkit/vendor/google.golang.org/grpc/server.go:1011 +0x4fc
    github.com/moby/buildkit/vendor/google.golang.org/grpc.(*Server).handleStream(0xc420244700, 0xed39c0, 0xc420694000, 0xc420671680, 0x0)
    	/go/src/github.com/moby/buildkit/vendor/google.golang.org/grpc/server.go:1249 +0x1318
    github.com/moby/buildkit/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc42063e0f0, 0xc420244700, 0xed39c0, 0xc420694000, 0xc420671680)
    	/go/src/github.com/moby/buildkit/vendor/google.golang.org/grpc/server.go:680 +0x9f
    created by github.com/moby/buildkit/vendor/google.golang.org/grpc.(*Server).serveStreams.func1
    	/go/src/github.com/moby/buildkit/vendor/google.golang.org/grpc/server.go:678 +0xa1

Which was due to `res, err := s.Bridge(j).Solve(ctx, req)` having `res.Metadata
== nil`. There are several paths in `llbBridge.Solve()` where this can be the
case, plus a case where this comes from a frontend which should not be allowed
to crash the daemon.

Likely introduced by d70d816dee or 6be1257f5d.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-03 16:08:04 +01:00
Tibor Vass e57eed420c
Merge pull request #549 from tonistiigi/dockerfile-names
dockerfile: custom names to vertexes
2018-07-31 10:58:56 -07:00
Tonis Tiigi 04a5cc81e8 dockerfile: add platform prefixes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-31 10:41:36 -07:00
Tonis Tiigi d0aafaefd0 dockerfile: add stage prefixes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-31 10:41:36 -07:00
Tonis Tiigi 4c44d2c6e4 dockerfile: custom names to vertexes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-31 10:41:30 -07:00
Akihiro Suda a5f442f2f4
Merge pull request #546 from tonistiigi/config-progress
llbsolver: show status of resolving image config
2018-07-30 12:06:35 +09:00
Akihiro Suda f668043366
Merge pull request #545 from tonistiigi/shared-refs-detect
cache: detect refs shared with image store
2018-07-30 12:05:53 +09:00
Tonis Tiigi b52c0002db llbsolver: show status of resolving image config
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-27 15:59:11 -07:00
Tonis Tiigi fe3388e70d solver: change builder.call to builder.context
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-27 15:39:14 -07:00
Tonis Tiigi d1ad6961e3 cache: detect refs shared with image store
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-27 14:08:50 -07:00
Akihiro Suda 3910818f92
Merge pull request #544 from tonistiigi/cache-record-type
cache: add record type field to usage record
2018-07-28 05:12:07 +09:00
Tonis Tiigi 97fa2b527a cache: add all option to prune
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-26 22:55:05 -07:00
Tonis Tiigi 489246dd28 cache: support for internal/frontend record type
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-26 22:54:53 -07:00
Tonis Tiigi 57b96a0ee5 cache: add record type field to usage record
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-26 22:54:39 -07:00
Tibor Vass aa81807f1c
Merge pull request #542 from tonistiigi/resolvemode
llb: add resolvemode to image source
2018-07-26 14:04:27 -07:00
Tõnis Tiigi 4159e2c45a
Merge pull request #543 from tonistiigi/filtering
Add filtering support for diskusage and prune
2018-07-26 10:32:37 -07:00
Tonis Tiigi 87f43efda5 cache: implementation for prune filtering
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 19:35:49 -07:00
Tonis Tiigi b966096ab5 dockerfile: allow setting image resolve mode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 18:23:59 -07:00
Tonis Tiigi 9f5e5c7dc7 metaresolver: refactor to option struct and resolvemode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 18:22:15 -07:00
Tonis Tiigi e971b7cddf pull: handle resolvemode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 18:20:55 -07:00
Tonis Tiigi a3b5d22419 llb: add resolvemode to image source
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 18:20:04 -07:00
Tonis Tiigi 70e0b64482 client: generalize the filter passing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 18:19:31 -07:00
Tonis Tiigi 0ba24f2a90 cache: implement filter for diskusage
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 17:20:59 -07:00
Tibor Vass d87d9d4c64
Merge pull request #499 from tonistiigi/caps3
exporter: export multiple refs with local/image exporter
2018-07-25 16:48:18 -07:00
Tonis Tiigi f719aadcba dockerfile: add tests for multi-platform exports
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:12 -07:00
Tonis Tiigi 6be1257f5d export: manifest list support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:12 -07:00
Tonis Tiigi 8c065401f2 exporter: reuse exptypes constants
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:12 -07:00
Tonis Tiigi 0e122d46eb exporter: allow export map with local exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:12 -07:00
Tonis Tiigi 69bb8e8a15 dockerfile: allow automatic platform variables
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:05 -07:00
Tonis Tiigi 33f4382b69 dockerfile: support exporting multiple platforms
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 14:37:01 -07:00
Tonis Tiigi d70d816dee exporter: update export signature
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 14:37:01 -07:00
Tõnis Tiigi 5098434f33
Merge pull request #530 from tonistiigi/winlayers-panic
winlayers: discard reader on apply errors
2018-07-25 12:59:35 -07:00
Tõnis Tiigi 1b8651bbe8
Merge pull request #538 from AkihiroSuda/vendor-containerd-20180724
vendor: update containerd
2018-07-25 11:14:52 -07:00
Tõnis Tiigi 7676543bbc
Merge pull request #541 from ijc/fix-cap-checks
apicaps: record the correct caps when constructing a CapSet
2018-07-25 11:08:38 -07:00
Ian Campbell e0196c9a12 apicaps: record the correct caps when constructing a CapSet
We need to capture `c` within the loop, otherwise all of the entries of `m` end
up pointing to the same thing, which is the last cap in `range caps`.

The symptom was that all caps were enabled/disabled based on the last cap's
setting and not their own.

Add a test for this.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-07-25 14:29:16 +01:00
Akihiro Suda 56fa35725a vendor: update containerd
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-07-25 16:37:42 +09:00
Akihiro Suda bec4a33fa5
Merge pull request #540 from tonistiigi/update-fsutil
vendor: update fsutil to b19464cd
2018-07-25 16:36:40 +09:00
Tonis Tiigi 0d6b052c97 dockerfile: add test for incremental copy regression
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-24 23:28:55 -07:00
Tonis Tiigi de50176daa vendor: update fsutil to b19464cd
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-24 23:28:12 -07:00
Akihiro Suda 8fa31102d5
Merge pull request #539 from tonistiigi/fix-cache-metadata-release
Fix cache metadata release
2018-07-24 13:36:22 +09:00
Akihiro Suda 031c065a06
Merge pull request #536 from tonistiigi/better-errors
Improve errors on missing sources and hash calculation
2018-07-24 11:25:58 +09:00
Akihiro Suda 89eee2126e
Merge pull request #535 from tonistiigi/merge-fix
solver: fix edge merge skipping issue
2018-07-24 11:25:09 +09:00
Akihiro Suda 1ebbba0828
Merge pull request #537 from tonistiigi/multi-key-cache
solver: improve multi-key root caching
2018-07-24 11:11:39 +09:00
Tonis Tiigi 73eaeba88c boltdbcache: fix releasing results
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-23 18:43:32 -07:00