Commit Graph

24 Commits

Author SHA1 Message Date
Maksym Pavlenko
dd22a3a806 Move WithMounts to specs
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-01-11 13:03:59 -08:00
Maksym Pavlenko
3bc8fc4d30 Cleanup build constraints
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-12-08 09:36:20 -08:00
Akihiro Suda
d3aa7ee9f0
Run go fmt with Go 1.17
The new `go fmt` adds `//go:build` lines (https://golang.org/doc/go1.17#tools).

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-08-22 09:31:50 +09:00
Derek McGowan
1c60ae7f87
Use local version of cri packages
Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-10-07 10:59:40 -07:00
Mike Brown
1b60224e2e use containerd/project header test
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-04-22 19:35:37 -05:00
Lantao Liu
50c73e6dc5 Move unix specific logic into _unix.go
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-09-03 16:23:42 -07:00
Lantao Liu
f08a90ff64 Fix hostname env.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-09-10 10:58:17 -07:00
Kir Kolyshkin
daeab40b45 os.Unmount: do not consult mountinfo, drop flags
1. Currently, Unmount() call takes a burden to parse the whole nine yards
of /proc/self/mountinfo to figure out whether the given mount point is
mounted or not (and returns an error in case parsing fails somehow).

Instead, let's just call umount() and ignore EINVAL, which results
in the same behavior, but much better performance.

This also introduces a slight change: in case target does not exist,
the appropriate error (ENOENT) is returned -- document that.

2. As Unmount() is always used with MNT_DETACH flag, let's drop the
flags argument. This way, the only reason of EINVAL returned from
umount(2) can only be "target is not mounted".

3. While at it, remove the 'containerdmount' alias from the package.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-04-30 12:54:10 -07:00
Lantao Liu
f4c9ef2647 Add symlink follow into unmount util.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-03-24 01:25:31 +00:00
Mike Brown
d4e7154625 move links for cri-containerd to cri
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2018-03-13 17:06:26 -05:00
Lantao Liu
6900cbdada Use mountpoint as image fs identifier.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-09 07:46:49 +00:00
Lantao Liu
025ffe551f Rename kubernetes-incubator/cri-containerd to containerd/cri-containerd.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-01-10 22:35:33 +00:00
Yanqiang Miao
c65921b16a Get the mountInfo by 'LookupMount' in containerd
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-10-12 11:09:24 +08:00
Lantao Liu
6cb3d27ed3 Use device number to find uuid
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-10-09 06:10:43 +00:00
Lantao Liu
491400c892 Add ImageFsInfo support
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-09-25 21:02:29 +00:00
Yanqiang Miao
49eb38a5d4 Ensure the mount point is propagated
mount with `rshared`, the host path should be shared.
mount with `rslave`, the host pash should be shared or slave.

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-09-19 14:21:21 +08:00
Ian Campbell
e0079125d2 Move resolveSymbolicLink to OS package and stub out for tests
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-15 11:25:45 +01:00
Lantao Liu
9d5990fe4f Add sandbox /dev/shm.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-11 09:49:46 +00:00
Lantao Liu
5398a3b7ec Add mount/unmount in os interface
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-11 09:23:04 +00:00
Crazykev
9bf7ffd51a generate and maintain resolv.conf for sandbox
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
2017-06-09 19:36:30 +08:00
Lantao Liu
88f4c252d6 Add sandbox /etc/hosts when using host network
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-06 06:43:38 +00:00
Xianglin Gao
4a4414987f Add unit test
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2017-05-23 18:30:20 +08:00
Random-Liu
bf28c7fc75 Add initial sandbox management implementation
Signed-off-by: Random-Liu <lantaol@google.com>
2017-05-12 13:14:11 -07:00
Random-Liu
f61c974faf Add OS interface and fake implementation.
Signed-off-by: Random-Liu <lantaol@google.com>
2017-05-03 16:55:28 -07:00