Commit Graph

10081 Commits

Author SHA1 Message Date
Akihiro Suda
0573e22e37
Merge pull request #5702 from dmcgowan/archive-cleanup-lchmod
archive: cleanup lchmod logic
2021-07-09 10:02:41 +09:00
Derek McGowan
53835221f6
Cleanup lchmod logic in archive
Move to single lchmod interface mirroring other implementations.
Separate logic for freebsd which supports symlink no follow flag.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-07-08 13:44:28 -07:00
Mike Brown
d1c1051927 use fu wei's suggeted interface pick for marshaling
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-07-07 15:45:45 -05:00
Mike Brown
14962dcbd2 add alpha version
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-07-06 11:40:20 -05:00
Kazuyoshi Kato
4c6e4a06ff gha: make release workflow work in forks
Fixes #5098.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-07-02 16:16:02 -07:00
Kazuyoshi Kato
73d28ddeb2 client: surface a connection error more clearly
gRPC-Go recently added grpc.WithReturnConnectionError() which improves
the situation of #2576.

Permission errors:

  % ./bin/ctr t ls
  ctr: failed to dial "/run/containerd/containerd.sock": connection error: desc = "transport: error while dialing: dial unix /run/containerd/containerd.sock: connect: permission denied"
  %

Non-existent sockets:

  % ./bin/ctr -a notfound t ls
  ctr: failed to dial "notfound": context deadline exceeded: connection error: desc = "transport: error while dialing: dial unix://notfound: timeout"
  %

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-07-02 14:56:04 -07:00
Maksym Pavlenko
7eceeb950b
Merge pull request #5571 from adelina-t/win_set_specific_go_version
Install specific golang version in Windows CI.
2021-07-02 14:54:58 -07:00
Derek McGowan
a7ad6b3be5
Add support for registry host path override
Adds support for mirrors which are non-compliant with the
OCI distribution specification but have previously mirrored
content with a namespace prefix after the API root `/v2`.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-07-02 09:48:27 -07:00
wanglei01
3a0b9ec6bb Add unit test for plugin
Signed-off-by: wanglei <wllenyj@linux.alibaba.com>
2021-07-02 18:43:34 +08:00
Derek McGowan
95c708572f
Update documenation for OCI distribution 1.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-07-01 17:24:08 -07:00
Daniel Canter
a81f05f360 [Vendor] Update hcsshim to 0.8.18
0.8.18 contains a fix for shim delete behavior, please see:
microsoft/hcsshim#1041

There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1
gets imported here but for containerd releases the runhcs shim binary is built from whatever
commit is vendored into containerd.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2021-06-30 17:08:40 -07:00
Claudiu Belu
16deba098c integration: Windows volume-copy-up images
For Windows, the container image's OS version must closely match the host's OS version.
For this reason, we need to add the --os-version annotation in image manifest lists,
so the Windows nodes can pull the appropriate image from the list.

Previously, the docker manifest CLI did not have the capability to set the --os-version,
it, but it has been introduced in docker 20.10.0.

We're also adding busybox.exe in the image, so we can run Linux commands inside the
container, so the tests will be simpler.

When building Windows images, a docker buildx builder needs to be created and used. When
building Windows images with docker buildx, the flag --output=type=registry is required,
otherwise it cannot be referenced on a Linux node.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-30 11:19:54 +00:00
zwtop
63fe34add6 grpc config add options tcp_tls_ca
Signed-off-by: zwtop <wang.zhan@smartx.com>
2021-06-30 10:58:32 +08:00
Phil Estes
25d7f907c0
Merge pull request #5660 from BigVan/main
Add ctr command label in NewContainerOpts
2021-06-29 15:03:43 -04:00
Mike Brown
a5c417ac06 move up to CRI v1 and support v1alpha in parallel
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-06-28 09:34:12 -05:00
Yifan Yuan
bda7b58666 feat: Add snapshotter label to the new snapshot for container.
add '--snapshotter-labels' in ctr run and ctr c create
which can pass labels to snappshotter on preparing new
snapshot.

Pass command label to snapshotter can help it determine
which kind of writable snapshots should be provide.

For some snapshotter, such as overlaybd:
  ( https://github.com/alibaba/accelerated-container-image ),
it can provide 2 kind of writable snapshot (overlayfs dir or
 blockdevice) by command label values.

Signed-off-by: Yifan Yuan <tuji.yyf@alibaba-inc.com>
2021-06-28 20:08:01 +08:00
Maksym Pavlenko
0bd2a86b1b
Merge pull request #5655 from kzys/dm-log
snapshot/devmapper: log exported methods correctly
2021-06-25 10:06:11 -07:00
Akihiro Suda
e72a56a1e9
Merge pull request #5662 from thaJeztah/fix_destdir
Makefile: fix DESTDIR and PREFIX concatenation
2021-06-25 23:41:16 +09:00
Sebastiaan van Stijn
2019a1e68f
Makefile: fix DESTDIR and PREFIX concatenation
Commits 77374e8 and b5f530a changed handling of the `DESTDIR` and `PREFIX`
variables, and introduced a `MANDIR` variable.

However, in those commits, the variables are concatenated with a directory
separator (`/`); `$DESTDIR/$PREFIX`. The `$PREFIX` variable (and consequently,
the `MANDIR` variable) already should have a leading `/` (absolute path), so
there should be no need to add it. In addition, adding the `/`, would not allow
either an empty path to be passed (well, it would result in `//` in the path),
or for `$PREFIX` to be used with a relative path (with an empty `$PREFIX`).

This patch removes the directory separator.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-25 14:12:56 +02:00
Claudiu Belu
04ab4418fd test integration: Adds a test that restarts a failed container
If a container failed to start due to a bad command, the container could not be
recreated with a proper command in its stead. Adds a test that verifies this scenario.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-25 10:33:38 +00:00
Akihiro Suda
e1f28659bc
Merge pull request #5287 from claudiubelu/cri-integration-cleanup
Cri integration cleanup
2021-06-25 12:42:33 +09:00
Kazuyoshi Kato
03ee450060 snapshot/devmapper: log exported methods correctly
- View was somehow logging itself as "prepare"
- Cleanup should have its debug log as like other exported methods

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-06-24 16:16:50 -07:00
Fu Wei
c8c6eed932
Merge pull request #5641 from thaJeztah/move_sys_fmountat
move sys.FMountat() into mount package and un-export
2021-06-24 22:16:48 +08:00
Sebastiaan van Stijn
a964cf0cc4
un-export mount.FMountat
It's only used internally, so we can un-export this utility until
it is needed elsewhere.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-23 18:14:53 +02:00
Sebastiaan van Stijn
21f532d518
move sys.FMountat() into mount package
It's the only location this is used, so might as well move it
into that package. I could not find external users of this utility,
so not adding an alias / deprecation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-23 18:14:30 +02:00
Fu Wei
03bfcd8a32
Merge pull request #5640 from dcbw/cni-plugin-pod-uid
sandbox: send pod UID to CNI plugins as K8S_POD_UID
2021-06-23 23:36:38 +08:00
Dan Williams
dac2543a07 sandbox: send pod UID to CNI plugins as K8S_POD_UID
CNI plugins that need to wait for network state to converge
may want to cancel waiting when a short lived pod is deleted.
However, there is a race between when kubelet asks the runtime
to create the sandbox for the pod, and when the plugin is able
request the pod object from the apiserver. It may be the case
that the plugin receives the new pod, rather than the pod
the sandbox request was initiated for.

Passing the pod UID to the plugin allows the plugin to check
whether the pod it gets from the apiserver is actually the
pod its sandbox request was started for.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2021-06-22 22:53:30 -05:00
Fu Wei
0396089f79
Merge pull request #5639 from thaJeztah/remove_sys_stat
sys: remove StatAtime(), StatCtime(), StatMtime() and StatATimeAsTime() utils
2021-06-23 07:48:44 +08:00
Sebastiaan van Stijn
5a0beaefbb
sys: remove StatAtime(), StatCtime(), StatMtime() and StatATimeAsTime() utils
This removes the StatAtime(), StatCtime(), StatMtime() and StatATimeAsTime()
utilities from the sys package. These utilities are not currently used in the
containerd codebase, and a copy of these utilities can be found in
github.com/containerd/continuity/fs;

- fa7d162237/fs/stat_darwinbsd.go
- fa7d162237/fs/stat_linuxopenbsd.go

Given that the containerd/sys package is not designed for external consumption,
I'm not adding "deprecated" comments (or aliases to their new location).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-23 00:08:49 +02:00
Phil Estes
ddeacc4b77
Merge pull request #5633 from thaJeztah/inline_statatimeastime
content/local: inline sys.StatATimeAsTime()
2021-06-22 12:24:12 -04:00
Fu Wei
1daea57ab5
Merge pull request #5636 from crosbymichael/multi-gpus
allow multi gpu to be specified via ctr
2021-06-23 00:08:48 +08:00
Akihiro Suda
f913a42755 go.mod: runc v1.0.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-06-22 10:26:46 -04:00
Akihiro Suda
28bb59c080 update runc binary to v1.0.0 GA
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-06-22 10:26:46 -04:00
Sebastiaan van Stijn
63c185da9a
content/local: inline sys.StatATimeAsTime()
The sys.StatATimeAsTime() utility is currently only used in a single place,
but because it's living in the "sys" package, also brings in other dependencies,
such as Microsoft/hcsshim.

This patch inlines the code from sys.StatATimeAsTime(), to remove that dependency.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-22 10:14:29 +02:00
Michael Crosby
09d78bb6b9 allow multi gpu to be specified via ctr
Signed-off-by: Michael Crosby <michael@thepasture.io>
2021-06-21 23:49:43 -04:00
Akihiro Suda
6883c84595
Merge pull request #5629 from mikebrow/master-to-main-doc-links
fixing some doc links
2021-06-22 11:36:22 +09:00
Akihiro Suda
5aeb13eb55
Merge pull request #5623 from dims/sync-integration/go.mod-with-root-go.mod
Sync integration/go.mod with root go.mod
2021-06-22 11:35:40 +09:00
Mike Brown
560e7d4799 fixing some doc links
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-06-21 18:24:47 -05:00
Davanum Srinivas
d9694b2976
Sync integration/go.mod with root go.mod
the root go.mod no longer pins these two imports to specific versions

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-06-21 16:32:07 -04:00
Phil Estes
c07711c8c0
Merge pull request #5615 from ktock/exposechangewriter
archive: Expose ChangeWriter to allow customized diff computing
2021-06-21 12:59:13 -04:00
ktock
4a46ea2f4b archive: Expose ChangeWriter to allow customized diff computing
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-06-21 18:48:00 +09:00
Fu Wei
ba70277fb7
Merge pull request #5625 from ktock/bb 2021-06-21 17:43:46 +08:00
ktock
cd33c007ce CI: Switch to available latest images
`mirror.gcr.io/library/busybox:1.32.0` is unavailable.

```console
$ curl -s https://mirror.gcr.io//v2/library/busybox/tags/list | jq '.tags'
[
  "1.26.2",
  "1.27.2",
  "1.28",
  "1.29",
  "1.29.2",
  "1.29.3",
  "1.30",
  "1.30.1",
  "1.31",
  "1.31.0",
  "1.31.1",
  "1.32",
  "latest"
]
```

`mirror.gcr.io/library/alpine:3.13` is unavailable.

```console
$ curl -s https://mirror.gcr.io//v2/library/alpine/tags/list | jq '.tags'
[
  "20200428",
  "3",
  "3.10",
  "3.11",
  "3.12",
  "3.12.0",
  "3.12.1",
  "3.13.5",
  "3.3",
  "3.4",
  "3.6",
  "3.7",
  "3.8",
  "3.9",
  "latest"
]
```

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-06-21 14:54:50 +09:00
Zufar Dhiyaulhaq
75b4c83f04 fix deprecation config for default runtime
Signed-off-by: Zufar Dhiyaulhaq <zufardhiyaulhaq@gmail.com>
2021-06-20 10:09:09 -04:00
Maksym Pavlenko
c88a5d0234
Merge pull request #5614 from estesp/test-criu-overlay
Re-enable criu in main integration runs
2021-06-19 12:36:40 -07:00
Maksym Pavlenko
f0a32c66da
Merge pull request #5617 from fidencio/wip/shimv2-debug
runtime,v2: Enable debug when containerd is on debug+ log level
2021-06-17 10:08:51 -07:00
Kazuyoshi Kato
1bbee573af github.com/golang/protobuf/proto is deprecated
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-06-17 10:28:48 -04:00
Kazuyoshi Kato
91c8fa4529 Update github.com/golang/protobuf from v1.3.5 to v1.4.3
google.golang.org/grpc doesn't work with protobuf v1.3.5.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-06-17 10:28:48 -04:00
Kazuyoshi Kato
b7e79dc5ab Update google.golang.org/grpc from v1.27.1 to v1.38.0
v1.38.0 is used by Kubernetes since
https://github.com/kubernetes/kubernetes/pull/100488.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-06-17 10:28:48 -04:00
ktock
8d2e156ddb Increase golangci-lint timeout
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-06-17 10:27:19 -04:00