Commit Graph

19 Commits

Author SHA1 Message Date
Tony Fang
8c80ccc7f4 Update external repo links that changed default branch to main
Signed-off-by: Tony Fang <nhfang@amazon.com>
2023-04-21 20:26:48 +00:00
Samuel Karp
b0b28f1d8e
Merge pull request #7879 from fuweid/clean-build-tags 2022-12-30 00:22:03 -08:00
Wei Fu
6b7e237fc7 chore: use go fix to cleanup old +build buildtag
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-29 14:25:14 +08:00
Rodrigo Campos
36f520dc04 Let OCI runtime create netns when userns is used
As explained in the comments, this patch lets the OCI runtime create the
netns when userns are in use. This is needed because the netns needs to
be owned by the userns (otherwise can't modify the IP, etc.).

Before this patch, we are creating the netns and then starting the pod
sandbox asking to join this netns. This can't never work with userns, as
the userns needs to be created first for the netns ownership to be
correct.

One option would be to also create the userns in containerd, then create
the netns. But this is painful (needs tricks with the go runtime,
special care to write the mapping, etc.).

So, we just let the OCI runtime create the userns and netns, that
creates them with the proper ownership.

As requested by Mike Brown, the current code when userns is not used is
left unchanged. We can unify the cases (with and without userns) in a
future release.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2022-12-21 10:40:30 -03:00
Sebastiaan van Stijn
29c7fc9520
clean-up "nolint" comments, remove unused ones
- fix "nolint" comments to be in the correct format (`//nolint:<linters>[,<linter>`
  no leading space, required colon (`:`) and linters.
- remove "nolint" comments for errcheck, which is disabled in our config.
- remove "nolint" comments that were no longer needed (nolintlint).
- where known, add a comment describing why a "nolint" was applied.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-12 14:40:59 +02:00
Mike Brown
147f0a7e02 check for duplicate nspath possibilities
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2022-04-14 18:33:19 +00:00
haoyun
bbe46b8c43 feat: replace github.com/pkg/errors to errors
Signed-off-by: haoyun <yun.hao@daocloud.io>
Co-authored-by: zounengren <zouyee1989@gmail.com>
2022-01-07 10:27:03 +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
6f027e38a8
Remove redundant build tags
Remove build tags which are already implied by the name of the file.
Ensures build tags are used consistently

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-08-05 22:27:46 -07:00
Lorenz Brun
36d0bc1f2b Allow moving netns directory into StateDir
Signed-off-by: Lorenz Brun <lorenz@nexantic.com>
2021-02-10 18:33:14 +01:00
Shengjing Zhu
5988bfc1ef docs: Various typo found by codespell
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-12-22 13:22:16 +08:00
Sebastiaan van Stijn
1146098421
replace pkg/symlink with moby/sys/symlink
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-30 00:05:15 +01:00
Davanum Srinivas
a9cb22309a
Copy pkg/symlink and pkg/truncindex from moby/moby
moby/moby SHA : 9c15e82f19b0ad3c5fe8617a8ec2dddc6639f40a

github.com/docker/docker/pkg/truncindex/truncindex.go -> pkg/cri/store/truncindex/truncindex.go
github.com/docker/docker/pkg/symlink/LICENSE.APACHE -> pkg/symlink/LICENSE.APACHE
github.com/docker/docker/pkg/symlink/LICENSE.BSD -> pkg/symlink/LICENSE.BSD
github.com/docker/docker/pkg/symlink/README.md -> pkg/symlink/README.md
github.com/docker/docker/pkg/symlink/fs.go -> pkg/symlink/fs.go
github.com/docker/docker/pkg/symlink/fs_unix.go -> pkg/symlink/fs_unix.go
github.com/docker/docker/pkg/symlink/fs_windows.go -> pkg/symlink/fs_windows.go

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-10-15 08:36:35 -04:00
Derek McGowan
07c98d0bf1 Fix lint in Unix environments
Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-10-05 17:46:01 -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
Phil Estes
161abf8f5b
Fix golangci-lint findings
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2019-09-19 09:38:40 -04:00
Lantao Liu
dc964de85f Add windows implmenetation
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-09-18 10:46:29 -07: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
c1740d8291 Manage mount lifecycle and remove cached state
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-10-24 11:00:25 -07:00