Commit Graph

13124 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
7de88c5ba3
reference/docker: align files with original code
This package was forked from the https://github.com/distribution/distribution
repository in commit 901bcb2231, but that commit
did a plain copy of the code (minus tests), and rewrote the code to be in a
single file. The same commit also removed some deprecated code for handling
"shortid" references (ParseAnyReferenceWithSet() function), in order to avoid
the "digestset" dependency from the distribution repo.

At the time, containerd used the distribution/distribution package from this
commit: 0d3efadf01

Since the code was forked, both containerd and distribution have received
improvements and fixes, so unfortunately, the code started to diverge.

I'm planning to reconcile the packages (potentially by using a shared module),
and this is the first commit to assist with that.

This patch restructures the reference/docker package to split the code into the
same files as are used in the upstream distribution/distribution repository.
This makes it easier to compare the implementations in both repositories (to
allow synchronizing changes).

No changes are applied yet, other than splitting the code (follow-up commits
will take care of syncing changes across).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-06 23:13:27 +01:00
Derek McGowan
31bb8fef7e
Merge pull request #7460 from AkihiroSuda/fetch-by-digest
remotes: add `FetcherByDigest` for fetching blobs without foreknown descriptors (useful for general-purpose CAS)
2022-11-04 15:20:29 -07:00
Kazuyoshi Kato
88dc30af12
Merge pull request #7403 from kit-ty-kate/freebsd-arm64
Fix "getCPUInfo for OS freebsd: not implemented" on FreeBSD/arm64
2022-11-04 10:22:30 -07:00
Kazuyoshi Kato
e306680f44
Merge pull request #7607 from jess-sol/main
Support default hosts.toml configuration
2022-11-04 10:22:00 -07:00
Kate
f32595a0c2 Fix "getCPUInfo for OS freebsd: not implemented" on FreeBSD/arm64
Signed-off-by: Kate <kit.ty.kate@disroot.org>
2022-11-04 12:31:03 +00:00
Maksym Pavlenko
b2a01eedf4
Merge pull request #7453 from swagatbora90/trace-cri-image
Add tracing spans in CRI image service and pull.go
2022-11-03 20:57:17 -07:00
Maksym Pavlenko
525fe21e22
Merge pull request #7604 from wzshiming/fix/close-fifo
Fix missing closed fifo
2022-11-03 20:55:28 -07:00
Maksym Pavlenko
9a5430dbee
Merge pull request #7624 from yzxiu/fix-comments
fix comments
2022-11-03 20:54:13 -07:00
Akihiro Suda
11a06c1a3d
ctr: add ctr content fetch-blob
e.g., `ctr content fetch-blob docker.io/library/debian:latest sha256:43d28810c1b4c28a1be3bac8e0e40fcc472b2bfcfcda952544ed99cb874d2b1a`

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-11-04 11:41:11 +09:00
Akihiro Suda
dfd6a3aa6e
remotes: add FetcherByDigest for fetching blobs without foreknown descriptors
Fetching blobs without foreknown descriptors is useful for using a registry as a general-purpose CAS.

Related: `oras blob fetch` (ORAS v0.15.0)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-11-04 11:41:07 +09:00
Shiming Zhang
c607f83c38 Fix missing closed fifo
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
2022-11-04 10:13:47 +08:00
Brian Goff
a24ef09937 Replace mount fork hack with CLONE_FS
This change spins up a new goroutine, locks it to a thread, then
unshares CLONE_FS which allows us to `Chdir` from inside the thread
without affecting the rest of the program.

The thread is no longer usable after unshare so it leaves the thread
locked to prevent go from returning the thread to the thread pool.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-11-03 22:30:35 +00:00
Jess
8b1b81eefd Update hosts doc
Signed-off-by: Jess <jess@ros.io>
2022-11-03 16:26:59 -06:00
Jess
f0bf9e7f8b Support default hosts.toml configuration
Add support for an optional `default` registry hosts config, should no
other hosts config match.

Signed-off-by: Jess <jess@ros.io>
2022-11-03 16:26:51 -06:00
Kazuyoshi Kato
c21d1baa88
Merge pull request #7626 from akhilerm/update-cherry-pick-process
docs: add additional info in backport process
2022-11-03 13:56:14 -07:00
Gavin Inglis
81bbd9daca add option to resolve symlinks to linux device
This change modifies WithLinuxDevice to take an option `followSymlink`
and be unexported as `withLinuxDevice`. An option
`WithLinuxDeviceFollowSymlinks` will call this unexported option to
follow a symlink, which will resolve a symlink before calling
`DeviceFromPath`. `WithLinuxDevice` has been changed to call
`withLinuxDevice` without following symlinks.

Signed-off-by: Gavin Inglis <giinglis@amazon.com>
2022-11-03 20:23:25 +00:00
Swagat Bora
ee64926a72 add SpanAttribute
Signed-off-by: Swagat Bora <sbora@amazon.com>
2022-11-03 18:34:06 +00:00
Akhil Mohan
2d9f0f2fbd
add additional info in backport process
add information in backporting process related to cherry-picking
main PR and related fixes

Signed-off-by: Akhil Mohan <makhil@vmware.com>
2022-11-03 23:50:39 +05:30
Swagat Bora
3b87d46ce2 Add tracing spans in CRI image service and pull.go
Signed-off-by: Swagat Bora <sbora@amazon.com>

Add spans around image unpack operations
Use image.ref to denote image name and image.id for the image config digest
Add top-level spand and record errors in the CRI instrumentation service
2022-11-03 17:03:43 +00:00
Kazuyoshi Kato
bb0c3804c6
Merge pull request #7621 from AkihiroSuda/go-mod-sys-v0.1.0
go.mod: golang.org/x/*: use tagged versions
2022-11-03 08:58:21 -07:00
yaozhenxiu
902b96cf25 fix comments
Signed-off-by: yaozhenxiu <946666800@qq.com>
2022-11-03 22:52:41 +08:00
Akihiro Suda
30c3078ae4
go.mod: golang.org/x/*: use tagged versions
golang.org/x/oauth2 is not updated due to its complex dependencies

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-11-03 10:18:31 +09:00
Kazuyoshi Kato
4e3d7e0aba
Merge pull request #7620 from cpuguy83/bump_go
Bump go version to 1.19.3
2022-11-02 15:41:41 -07:00
Derek McGowan
49f96d8f7d
Merge pull request #7615 from turan18/export-bug
ctr export strictly matching
2022-11-02 14:36:56 -07:00
Brian Goff
422a240666 Bump go version to 1.19.3
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-11-02 19:54:42 +00:00
Kazuyoshi Kato
8c5baf4ebb
Merge pull request #7617 from mxpv/ctr-fix
Fix ctr crash when pulling with --http-dump and --http-trace simultaneously
2022-11-02 07:58:18 -07:00
Phil Estes
58587d3a8a
Merge pull request #7599 from cji/cji-hardenperms
Harden GITHUB_TOKEN permissions for OSSF Scorecard
2022-11-02 10:51:08 -04:00
Maksym Pavlenko
9c2a634408 Fix ctr crash when pulling with http-trace and http-dump
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-11-01 16:28:39 -07:00
Phil Estes
740c9335be
Merge pull request #7611 from dcantah/fast-path-userxattr
overlayutils: Add fastpath for userxattr check
2022-11-01 16:08:34 -04:00
Yasin Turan
78ac0046a7 ctr export strictly match default platform
Signed-off-by: Yasin Turan <turyasin@amazon.com>
2022-11-01 17:35:30 +00:00
Derek McGowan
68ff465fb6
Merge pull request #7606 from mxpv/diagram
Add sequence diagram for shim runtime v2
2022-11-01 10:18:47 -07:00
Derek McGowan
866389c949
Merge pull request #7600 from dcantah/sandbox-proxy
Sandbox API: Move remote impls to /sandbox/proxy
2022-11-01 10:11:14 -07:00
Craig Ingram
a270d6e8ae
Harden GITHUB_TOKEN permissions
Signed-off-by: Craig Ingram <cjingram@google.com>
2022-11-01 10:56:38 -04:00
huoqifeng
98269c0619 s390x: initial enabler
Signed-off-by: huoqifeng <huoqif@cn.ibm.com>
2022-11-01 13:15:15 +08:00
Danny Canter
4b2a23e7ea overlayutils: Add fastpath for userxattr check
Cleaning up TODO's. If we're on >= 5.11 we need userxattr so check
the kernel version to skip the manual check via mounting. It feels
odd to use contrib/seccomp here but the alternative is pulling that
kernel parsing code out into the main pkgs. Another is using the moby
parser but that's in moby/moby which is also a dep we don't want here..

Signed-off-by: Danny Canter <danny@dcantah.dev>
2022-10-31 17:19:23 -07:00
Maksym Pavlenko
2da7824683 Add sequence diagram for shim runtime v2
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-10-31 15:45:28 -07:00
Danny Canter
0be981595d Sandbox API: Move remote impls to /sandbox/proxy
Following how some of the other stores/services are returned in the
client package, it makes sense to me to move the remoteFooBars in
the sandbox API to a proxy sub-package under /sandbox. Given this
has only been in a 1.7 beta, I hope this is fine to move around still.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2022-10-28 14:47:09 -07:00
Samuel Karp
8167751f56
Merge pull request #7588 from AdamKorcz/fuzz1 2022-10-28 11:22:28 -07:00
AdamKorcz
2e83d885dc fuzzing: improve archive fuzzer
Signed-off-by: AdamKorcz <adam@adalogics.com>
2022-10-28 03:43:23 +01:00
Samuel Karp
d577ef872a
Merge pull request #7537 from swagatbora90/fix-client-wait-start 2022-10-26 18:31:19 -07:00
Kazuyoshi Kato
47657926af
Merge pull request #7025 from aznashwan/hyperv-containers-critest
Add Workflow for running critest with Hyper-V Containers on Windows.
2022-10-26 06:09:48 -07:00
Nashwan Azhari
7c77b3540d Add Workflow for running critest with Hyper-V Containers on Windows.
Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-10-26 13:33:45 +03:00
Gabriel Adrian Samfira
9494f0b806 Add HyperV config in tests
This change adds two new environment variables to cri-integration tests
on Windows that enable Hyper-V isolation.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-10-26 13:33:45 +03:00
Derek McGowan
d878d7dda8
Merge pull request #7575 from dmcgowan/prepare-1.7-beta-release
Add release notes for v1.7.0-beta.0
2022-10-25 16:29:20 -07:00
Derek McGowan
53f67705cb
Add release notes for v1.7.0-beta.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-10-25 13:53:14 -07:00
Derek McGowan
c776a3631f
Update mailmap
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-10-25 13:53:14 -07:00
Phil Estes
fc89d49531
Merge pull request #7576 from containerd/sb
Cleanup sandbox interfaces
2022-10-25 14:57:23 -04:00
Kazuyoshi Kato
7062dbcaad
Merge pull request #7581 from austinvazquez/upgrade-release-workflow
Update GitHub actions release workflow set output
2022-10-25 09:48:07 -07:00
Maksym Pavlenko
b7d0d12715 Cleanup sandbox interfaces
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-10-25 12:31:32 -04:00
Austin Vazquez
be3987a92d Migrate away from GitHub actions set-output
Migrate from set-output call to write to new GITHUB_OUTPUT environment
file.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2022-10-24 22:48:42 +00:00