Commit Graph

9367 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
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
Phil Estes
25d7f907c0
Merge pull request #5660 from BigVan/main
Add ctr command label in NewContainerOpts
2021-06-29 15:03:43 -04: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
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
Fabiano Fidêncio
87a2e0b2a2 runtime,v2: Enable debug when containerd is on debug+ log level
Currently the shimv2 debug is only enabled when containerd is,
specifically, on debug mode.  However, it should be enabled whenever the
CRI runtime is on debug *or any other lower* mode, as in trace mode.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-06-17 12:43:02 +02:00
Fu Wei
11304a4ac8
Merge pull request #5611 from cloudtogo/rootfs-propagation
ctr flags of container rootfs propagation
2021-06-17 11:30:14 +08:00
kh
05e51539a9 command line flags of setting container rootfs propagation
Signed-off-by: Kitt Hsu <kitt.hsu@gmail.com>
2021-06-17 10:03:37 +08:00
Phil Estes
394f864750
Re-enable criu in main integration runs
Ubuntu kernel updates claim that the criu+overlayfs bug is finally fixed
in released kernels.

Signed-off-by: Phil Estes <estesp@amazon.com>
2021-06-16 17:46:27 -04:00
Jiaming Xu
1dada3fc2a add cgroupv2 setup for cos with a flag
Signed-off-by: Jiaming Xu <jiamingxu@google.com>

address feedbacks
2021-06-16 14:37:44 -04:00
Phil Estes
0631cec6e3
Merge pull request #5612 from cpuguy83/update_gotestsum
Update gotestsum to add timestamps to junit output
2021-06-16 14:35:06 -04:00
Brian Goff
bfbebf02b7 Update gotestsum to add timestamps to junit output
The current release of gotestsum is missing timestamps in the junit
data, which makes it difficult to import in an external system later.

https://github.com/gotestyourself/gotestsum/commit/012a85e34a7ce5554057d512e55dcb
includes the necessary changes to add the timestamp for the test run to
the junit output.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-16 16:17:40 +00:00
Phil Estes
0a3a77bc44
Merge pull request #5604 from ktock/nvidiacgroups
Allow to pass --no-cgroups option to nvidia-container-cli
2021-06-14 14:35:00 -04:00
ktock
9c01fe20d3 Allow to pass --no-cgroup option to nvidia-container-cli
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-06-14 23:58:22 +09:00
Phil Estes
fdfe01d7d3
Merge pull request #5577 from oss-qm/submit/fhs-manpage
Makefile: FHS conformant manpage installation pathes
2021-06-11 14:09:07 -04:00
Enrico Weigelt, metux IT consult
77374e8b35 Makefile: FHS conformant manpage installation pathes
FHS mandates manpages should go to /usr/share/man (or /usr/local/share/man,
for site local installations) -- /usr/man was an fallout of some ancient
Unices that haven't been fully FHS conformant and usually just a symlink to
/usr/share/man, if existing at all.

Distros sometimes need to override this (eg. MVCC installs), therefore go
the 30+ years common practise way and introduce MANDIR environment variable.
Since it's a subdir under the prefix for general constant and machine
architecture independ data -- which in turn also sometimes wants to be
overridden by distros, it shall be derived from DATADIR variable.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2021-06-10 19:07:15 +02:00
Phil Estes
2076dc6ffa
Merge pull request #5594 from estesp/go-for-project-checks
Add proper Go version before project checks
2021-06-10 12:03:35 -04:00