Commit Graph

12912 Commits

Author SHA1 Message Date
Derek McGowan
b32638e21b
ctr: pull or fetch image metadata by default
The metadata is small and useful for viewing all platforms
for an image and enabling push back to the same registry.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-31 11:07:52 -07:00
Derek McGowan
20f79300cf
push: inherit distribution sources from parent
When a blob does not exist locally, rather than erroring on info
lookup, inherit the parent distribution sources. Push is able
to succeed even if the blob does not exist locally when a cross
repository mount is done. This is a common operation pushing a
multi-platform image to the same registry but different namespace.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-31 11:07:51 -07:00
Derek McGowan
24aca53fa0
Update use of content.Infoprovider
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-31 11:04:33 -07:00
Derek McGowan
f8c789f319
content: add InfoProvider interface
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-31 11:04:32 -07:00
Kirtana Ashok
02d519ad64 Update hcsshim tag in runhcs-version script
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-08-31 10:07:14 -07:00
Danny Canter
a2817ca16d CRI: Include sandbox ID in failed to load error
The failed to recover state message didn't include the ID making this
not as useful as it could be..

This additionally moves some of the other logs to include the id for
the sandbox/container as a field instead of part of a format string.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-08-31 10:07:07 -07:00
Derek McGowan
b2f46463b5
Merge pull request #9031 from thaJeztah/revert_log_var
Revert "log: define G() as a function instead of a variable"
2023-08-31 06:55:41 -07:00
Sebastiaan van Stijn
4923470902
replace reference/docker for github.com/distribution/reference v0.5.0
The reference/docker package was a fork of github.com/distribution/distribution,
which could not easily be used as a direct dependency, as it brought many other
dependencies with it.

The "reference' package has now moved to a separate repository, which means
we can replace the local fork, and use the upstream implementation again.

The new module was extracted from the distribution repository at commit:
b9b19409cf

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-31 15:54:50 +02:00
TTFISH
26dcae2f6b fix ossfuzz building error
Signed-off-by: TTFISH <jiongchiyu@gmail.com>
2023-08-31 20:07:05 +08:00
Derek McGowan
f9608c0027
Merge pull request #9030 from kiashok/updateShimTag-main
Update hcsshim tag to v0.12.0-rc.0
2023-08-30 16:13:15 -07:00
Sebastiaan van Stijn
19d6c37a3f
Revert "log: define G() as a function instead of a variable"
This reverts commit 778ac302b2.

(slightly modified, due to changes that were merged after that).

The reverted commit had two elements;

- Make `G` an actual function to improve the documentation
- Prevent `G` from being overwritten externally

From the commit that's reverted:

> The `G` variable is exported, and not expected to be overwritten
> externally. Defining it as a function also documents it as a function
> on https://pkg.go.dev, instead of a variable; https://pkg.go.dev/github.com/containerd/containerd@v1.6.22/log#pkg-variables

While it's unclear if the ability to replace the implementation was
_intentional_, it's this part that some external consumers were (ab)using.

We should look into that part in a follow-up, and design for this, for
example by providing a utility to replace the logger, and properly document
that.

In the meantime, let's revert the change.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 21:46:21 +02:00
Kirtana Ashok
fd5d92a7f5 Update hcsshim tag versioning to v0.12.0-rc.0
hcsshim tags v0.10.* is deprecated, so using the new
v0.12.0-rc.* versioning for hcsshim tags on containerd/main

Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-08-29 17:41:20 -07:00
Edgar Lee
779875a057 Add missing unpacker.Wait for image import
- For remote snapshotters, the unpack phase serves as an important step for
  preparing the remote snapshot. With the missing unpacker.Wait, the
  snapshotter `Prepare` context is always canceled.
- This patch allows remote snapshotter based archives to be imported via
  the transfer service or `ctr image import`

Signed-off-by: Edgar Lee <edgarhinshunlee@gmail.com>
2023-08-29 15:34:20 -07:00
Samuel Karp
b0a7f08aa7
Merge pull request #9021 from akhilerm/make-configurable-dependencies
make repositories of install dependencies configurable
2023-08-28 23:55:48 -07:00
Samuel Karp
cb532a87ef
Merge pull request #9019 from dcantah/hcsshim-version
Windows: Supply windows shim version via file
2023-08-28 23:48:32 -07:00
Derek McGowan
4f5db2bc03
metadata: format unit test output
Make it easier to see list differences in gc node test failure output.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-28 16:52:25 -07:00
Danny Canter
15b13fb3ea Windows: Supply windows shim version via file
Somewhat similar to how we supply the version of runc to grab for testing via
a file in script/, this change supplies the Windows shim version to build off
of via a file in the same directory. This seems like a decent home given it now
lives next to the script that pulls and builds the shim to include in our build
artifacts/locally.

The motivation behind this change is:

Cut down on unneccessary hcsshim vendorings if no library code for containerd
changed. It was some what clunky how the Windows builds work today. The Windows
shim is developed out of tree at github.com/microsoft/hcsshim. To let containerd know
what tag to build the shim off of we'd vendor hcsshim into containerd, and then
parse the version string from go.mod, fetch this tag, and then build the shim and
include it in our artifacts. As mentioned, often times the vendoring would bring in
no actual changes that would affect containerd's usage of hcsshim as a library, and
would just serve as a means to bump the version of the containerd shim we should build.

Now this process can be a one line change and we can avoid the possible headaches that come
with bumping go.mod (bumping other unrelated deps etc.)

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-08-28 11:55:55 -07:00
Derek McGowan
c0111909a7
Merge pull request #9009 from dcantah/block-file-recreate
Blockfile: Expose RecreateScratch option
2023-08-28 11:53:56 -07:00
Derek McGowan
2a806c710a
Merge pull request #9017 from Juneezee/refactor/redundant-nil-check
Remove redundant nil check
2023-08-28 06:55:10 -07:00
Akhil Mohan
7a0ad09a0d
make repositories of install dependencies configurable
make repositories of dependencies like runc, crun, cni and critools configurable

Signed-off-by: Akhil Mohan <makhil@vmware.com>
2023-08-28 18:43:41 +05:30
Eng Zer Jun
34def8b33b
Remove redundant nil check
From the Go docs:

  "For a nil slice, the number of iterations is 0." [1]

Both `info.RootFS` and `host.clientPairs` are slices. Therefore, an
additional nil check for before the loop is unnecessary.

[1]: https://go.dev/ref/spec#For_range

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-08-27 17:56:27 +08:00
Jin Dong
fc45365fa1 Remove most logrus
Signed-off-by: Jin Dong <jin.dong@databricks.com>
2023-08-26 14:31:53 -04:00
Derek McGowan
03e4f1e363
Merge pull request #9006 from bart0sh/PR010-update-LTS-doc
Update LTS description
2023-08-25 10:22:18 -07:00
Maksym Pavlenko
871a94a465
Merge pull request #8565 from samuelkarp/ctr-override-mounts
ctr: allow run to override mounts
2023-08-25 10:01:11 -07:00
Enrico Weigelt, metux IT consult
f9c35feb30 Makefile: allow overriding GO_BUILD_FLAGS via environment
Allow overriding GO_BUILD_FLAGS via environment, do distros can easily
inject additionally required build flags (eg. -buildvcs=false).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-25 16:26:13 +02:00
Phil Estes
adbc13c3e2
Merge pull request #9011 from AkihiroSuda/continuity-v0.4.2
go.mod: github.com/containerd/continuity v0.4.2
2023-08-25 09:25:55 -04:00
Akihiro Suda
490905be6f
go.mod: github.com/containerd/continuity v0.4.2
https://github.com/containerd/continuity/compare/1e0d26eb2381...v0.4.2

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-25 16:39:55 +09:00
Ed Bartosh
03abceac56 Update LTS description
Explicitly mentioned a possibility to take feature backports
to support new Kubernetes releases.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2023-08-25 10:33:32 +03:00
Danny Canter
34f32043bc Blockfile: Expose RecreateScratch option
This was the only option not configurable from the toml for the plugin.
This is useful if you want to restart containerd and try a different
blockfile/size for the snapshotter.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-08-24 13:28:22 -07:00
Derek McGowan
db5fc4ab45
Merge pull request #9008 from mxpv/stale
Add stale bot
2023-08-24 13:21:59 -07:00
Phil Estes
ba56b1fb3b
Merge pull request #9007 from champtar/critools-1.28.0
Update critools to 1.28.0
2023-08-24 15:56:53 -04:00
Maksym Pavlenko
b4f487ce9d
Apply suggestions from code review
Co-authored-by: Samuel Karp <me@samuelkarp.com>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-08-24 09:56:17 -07:00
Maksym Pavlenko
1e3540e110 Add stale bot
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-08-24 09:28:40 -07:00
Etienne Champetier
4e236962fe Update critools to 1.28.0
https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.28.0

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
2023-08-24 11:15:24 -04:00
Akihiro Suda
f48bbef193
Merge pull request #8994 from mxpv/cri
Use sandboxed CRI by default
2023-08-24 13:42:58 +09:00
Phil Estes
8e7a25856b
Merge pull request #8998 from dmcgowan/image-inspect
ctr: images inspect
2023-08-23 14:12:56 -04:00
Phil Estes
1ffe80c7f6
Merge pull request #8730 from thaJeztah/sprint_less
replace some fmt.Sprintfs with strconv
2023-08-23 12:02:09 -04:00
Maksym Pavlenko
c92f4a160e
Update RELEASES
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-08-23 08:50:42 -07:00
Maksym Pavlenko
c3f3cad287
Use sandboxed CRI by default
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-08-23 08:50:40 -07:00
Maksym Pavlenko
e7dee269d6
Merge pull request #8960 from dcantah/sandbox-annotations
Sandbox: Add annotations to CreateSandbox surface
2023-08-23 08:42:46 -07:00
Sebastiaan van Stijn
b76cd4d9fd
replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations:

    BenchmarkSprintf-10       37735996    32.31  ns/op  0 B/op  0 allocs/op
    BenchmarkItoa-10         591945836     2.031 ns/op  0 B/op  0 allocs/op
    BenchmarkFormatUint-10   593701444     2.014 ns/op  0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-23 16:43:02 +02:00
Derek McGowan
bbdbf7ab6c
Add inspect image commands
Outputs the image structure as a tree with an option to show content
and related labels for the image.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-23 06:52:35 -07:00
Derek McGowan
78308b4a44
Add manifest printer library
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-23 06:52:35 -07:00
Sebastiaan van Stijn
11a5dd8265
snapshots: replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations:

    BenchmarkSprintf-10       37735996    32.31  ns/op  0 B/op  0 allocs/op
    BenchmarkItoa-10         591945836     2.031 ns/op  0 B/op  0 allocs/op
    BenchmarkFormatUint-10   593701444     2.014 ns/op  0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-23 10:10:59 +02:00
Sebastiaan van Stijn
06765c9ef5
oci: replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations:

    BenchmarkSprintf-10       37735996    32.31  ns/op  0 B/op  0 allocs/op
    BenchmarkItoa-10         591945836     2.031 ns/op  0 B/op  0 allocs/op
    BenchmarkFormatUint-10   593701444     2.014 ns/op  0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-23 10:10:59 +02:00
Sebastiaan van Stijn
710d22366d
removes/docker: replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations:

    BenchmarkSprintf-10       37735996    32.31  ns/op  0 B/op  0 allocs/op
    BenchmarkItoa-10         591945836     2.031 ns/op  0 B/op  0 allocs/op
    BenchmarkFormatUint-10   593701444     2.014 ns/op  0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-23 10:10:59 +02:00
Sebastiaan van Stijn
d7bc8694be
pkg/cri: replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations:

    BenchmarkSprintf-10       37735996    32.31  ns/op  0 B/op  0 allocs/op
    BenchmarkItoa-10         591945836     2.031 ns/op  0 B/op  0 allocs/op
    BenchmarkFormatUint-10   593701444     2.014 ns/op  0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-23 10:10:56 +02:00
Fu Wei
738c153573
Merge pull request #8992 from djdongjin/remove-hashicorp-multierror
Remove hashicorp/go-multierror dependency
2023-08-23 13:13:51 +08:00
Maksym Pavlenko
36dcc294ee
Merge pull request #8995 from yankay/append-k8s-1.28-to-releases
Append k8s 1.28 to RELEASES.md
2023-08-22 19:23:46 -07:00
Derek McGowan
55c877297a
Merge pull request #8556 from Wang99998/main
Update default platform matcher when ctr import
2023-08-22 16:53:42 -07:00