Commit Graph

11307 Commits

Author SHA1 Message Date
Sophie Liu
3e4449862b Add logging volume metrics to Containerd CRI plugin
Signed-off-by: Sophie Liu <sophieliu@google.com>
2022-10-19 10:47:49 -04:00
Derek McGowan
3ddcbf5f11
Update 1.5 release support timeframe
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-10-18 22:36:45 -07:00
Kazuyoshi Kato
3bfa8556cf
Merge pull request #7503 from AdamKorcz/fuzz1
bump go-fuzz-headers
2022-10-18 20:10:55 -07:00
AdamKorcz
9a8611d635 bump go-fuzz-headers
Signed-off-by: AdamKorcz <adam@adalogics.com>
2022-10-19 00:13:07 +01:00
Derek McGowan
8d6350f94a
Merge pull request #7454 from dmcgowan/add-lts-release
Add long term stable release branches
2022-10-18 15:14:40 -07:00
Samuel Karp
9d0e1f51fa
Merge pull request #7473 from lengrongfu/fix/push_concurrent_close_channel 2022-10-18 14:16:49 -07:00
Samuel Karp
e8cdbee1e6
Merge pull request #7530 from kzys/critest-ginkgo-v2 2022-10-18 11:41:34 -07:00
Phil Estes
b2b24d4f1c
Merge pull request #7541 from JohnJAS/defect1
containerd should not print error log that failed to init a tracing processor while the tracing plugin is not loaded
2022-10-18 10:23:36 -04:00
Joseph Sheng
fc86be5011 not init a tracing processor when not loaded
Signed-off-by: Joseph Sheng <jiajun.sheng@microfocus.com>
2022-10-18 09:47:22 +08:00
Kazuyoshi Kato
ac5e72442b
Merge pull request #7544 from estesp/update-go-ver
Update required Go version in BUILDING.md
2022-10-17 13:08:11 -07:00
Phil Estes
4fdebea98b
Merge pull request #7522 from thaJeztah/protobuf_extensions_tag
go.mod: matttproud/golang_protobuf_extensions v1.0.2 (use tag)
2022-10-17 09:55:36 -07:00
Phil Estes
9f6947f672
Merge pull request #7542 from aznashwan/makefile-gopath
Use `go env` to determine GOPATH in Makefile.
2022-10-17 09:46:25 -07:00
Phil Estes
47fa603e1c
Update required Go version in BUILDING.md
Our main branch no longer builds successfully with Go 1.17.

Signed-off-by: Phil Estes <estesp@amazon.com>
2022-10-17 12:45:12 -04:00
Kazuyoshi Kato
8e7ef890a5 Use logtest if possible to clean up logs
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-10-17 16:27:23 +00:00
Kazuyoshi Kato
a76d68ee48 Separate containerd logs in GitHub Actions' console
`::group::` groups containerd logs by default.

https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-10-17 16:27:23 +00:00
Kazuyoshi Kato
e47bdbd16f Upgrade critools from 1.24.1 to 1.25.0
This version up will migrate critools off from Ginkgo 1.x which has been
deprecated.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-10-17 16:27:23 +00:00
Kazuyoshi Kato
878dbc7afa Upgrade actions/upload-artifact from v2 to v3
v2 uses Node.js 12.x which is EOL.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-10-17 16:27:23 +00:00
Mike Brown
3ce301ddee
Merge pull request #7349 from thaJeztah/gofmt_119
clean-up "nolint" comments, remove unused ones, update golangci-lint
2022-10-17 10:50:24 -05:00
Phil Estes
d7ea7de900
Merge pull request #7534 from mxpv/shim
Don't unmount on Darwin when deleting bundle
2022-10-17 08:27:05 -07:00
Phil Estes
738a15d3e7
Merge pull request #7538 from mxpv/timeouts
Add timeouts to all CI jobs
2022-10-17 07:03:57 -07:00
Nashwan Azhari
1982772029 Use go env to determine GOPATH in Makefile.
Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-10-17 15:03:37 +03:00
Sebastiaan van Stijn
6a07a1c070
go.mod: matttproud/golang_protobuf_extensions v1.0.2 (use tag)
it's the same commit: https://github.com/matttproud/golang_protobuf_extensions/compare/v1.0.2...c182affec369

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-17 00:56:34 +02:00
Sebastiaan van Stijn
972399538d
sys: synchronize mkdirall() with latest os.MkDirAll()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-17 00:55:37 +02:00
Sebastiaan van Stijn
063c5f9804
sys: create SecurityAttribute only once (Windows)
The same attribute was generated for each path that was created, but always
the same, so instead of generating it in each iteration, generate it once,
and pass it to our mkdirall() implementation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-17 00:55:37 +02:00
Sebastiaan van Stijn
a983599e2b
sys: update volumePath regex to allow returning earlier
The regex only matched volume paths without a trailing path-separator. In cases
where a path would be passed with a trailing path-separator, it would depend on
further code in mkdirall to strip the trailing slash, then to perform the regex
again in the next iteration.

While regexes aren't ideal, we're already executing this one, so we may as well
use it to match those situations as well (instead of executing it twice), to
allow us to return early.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-17 00:55:37 +02:00
Sebastiaan van Stijn
d422c87e44
sys: compile volume-path regex once, and update GoDoc
Ideally, we would construct this lazily, but adding a function and a
sync.Once felt like a bit "too much".

Also updated the GoDoc for some functions to better describe what they do.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-17 00:55:37 +02:00
Samuel Karp
8ee685662d
Merge pull request #7539 from AkihiroSuda/fix-rocky-ci
Vagrantfile: explicitly specify rsync as the shared folder driver
2022-10-16 13:38:06 -07:00
Akihiro Suda
691b4ea85f
Merge pull request #7527 from thaJeztah/remove_sys_isabs
sys: remove unused IsAbs() (windows)
2022-10-16 22:13:20 +09:00
Akihiro Suda
f8f0524828
Vagrantfile: explicitly specify rsync as the shared folder driver
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-10-16 21:44:59 +09:00
Maksym Pavlenko
4839f1bdff Add timeouts to all CI jobs
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-10-15 17:04:57 -07:00
Maksym Pavlenko
87b3eec2b2
Merge pull request #7535 from samuelkarp/ip-leakage-flake
cri: PodSandboxStatus should tolerate missing task
2022-10-15 16:51:46 -07:00
Samuel Karp
890398677e
cri: PodSandboxStatus should tolerate missing task
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2022-10-14 14:40:13 -07:00
Maksym Pavlenko
fb6a40dc9d Don't unmount on Darwin when deleting bundle
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-10-14 14:35:24 -07:00
Sebastiaan van Stijn
c7e6a889b8
sys: remove unused IsAbs() (windows)
This function was forked from Moby in 6089c1525b,
which copied the whole file, but the `IsAbs()` was never used, and has no
external consumers, so let's remove it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-14 10:41:23 +02:00
Kazuyoshi Kato
766e933151
Merge pull request #7489 from AkihiroSuda/switch-away-from-ubuntu-18.04
CI: update GHA instances from Ubuntu 18.04 to 20.04
2022-10-13 11:33:55 -07:00
Samuel Karp
6333c751ce
Merge pull request #7519 from Iceber/fix_flags 2022-10-13 11:21:17 -07:00
Kazuyoshi Kato
67ec7646d6
Merge pull request #7510 from zhuchenwang/main
Update the default seccomp to block socket calls to AF_VSOCK
2022-10-13 08:31:49 -07:00
Kazuyoshi Kato
0ba5b41da5
Merge pull request #7511 from thaJeztah/use_SetStdHandle
cmd/containerd: use golang.org/x/sys/windows.SetStdHandle()
2022-10-13 08:30:45 -07:00
Phil Estes
330df47c35
Merge pull request #7517 from kzys/stats-nil
Stats() shouldn't assume s.container is non-nil
2022-10-13 07:14:57 -07:00
Iceber Gu
48daccb4dd fix the --no-pivot flag being ignored by ctr tasks start
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2022-10-13 11:50:26 +08:00
Akihiro Suda
ea53e52fc0
CI: update GHA instances from Ubuntu 18.04 to 20.04
The release binaries are built using Ubuntu 18.04 in Docker on Ubuntu 20.04
for glibc compatibility reason (issue 7255).

Fix issue 7297

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-10-13 09:55:23 +09:00
Kazuyoshi Kato
49a54e23cb Stats() shouldn't assume s.container is non-nil
Like other exported methods, Stats() shouldn't assume s.container is
non-nil.

Fixes #7468.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-10-12 22:11:49 +00:00
Samuel Karp
271628971f
Merge pull request #7516 from estesp/deprecated-actions 2022-10-12 14:46:49 -07:00
Phil Estes
e7c8a5ab08
Move up actions versions to prep for deprecation
Signed-off-by: Phil Estes <estesp@amazon.com>
2022-10-12 15:17:27 -04:00
Sebastiaan van Stijn
752bff981a
cmd/containerd: use golang.org/x/sys/windows.SetStdHandle()
golang.org/x/sys/windows now implements this, so we can use that
instead of a local implementation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-12 19:33:34 +02:00
Phil Estes
8b804c4f81
Merge pull request #7512 from thaJeztah/use_SetRecoveryActions
cmd/containerd: use golang.org/x/sys Service.SetRecoveryActions()
2022-10-12 09:56:06 -07:00
Sebastiaan van Stijn
8b5df7d347
update golangci-lint to v1.49.0
Also remove "nolint" comments for deadcode, which is deprecated, and removed
from the defaults.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-12 14:41:01 +02:00
Sebastiaan van Stijn
f9c80be1bb
remove unneeded nolint-comments (nolintlint), disable deprecated linters
Remove nolint-comments that weren't hit by linters, and remove the "structcheck"
and "varcheck" linters, as they have been deprecated:

    WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
    WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
    WARN [linters context] structcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-12 14:41:01 +02: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
Sebastiaan van Stijn
d215725136
pkg/cri/(server|sbserver): criService.getTLSConfig() add TODO to verify nolint
This `//nolint`  was added in f5c7ac9272
to suppress warnings about the `NameToCertificate` function being deprecated:

    // Deprecated: NameToCertificate only allows associating a single certificate
    // with a given name. Leave that field nil to let the library select the first
    // compatible chain from Certificates.

Looking at that, it was deprecated in Go 1.14 through
eb93c684d4
(https://go-review.googlesource.com/c/go/+/205059), which describes:

    crypto/tls: select only compatible chains from Certificates

    Now that we have a full implementation of the logic to check certificate
    compatibility, we can let applications just list multiple chains in
    Certificates (for example, an RSA and an ECDSA one) and choose the most
    appropriate automatically.

    NameToCertificate only maps each name to one chain, so simply deprecate
    it, and while at it simplify its implementation by not stripping
    trailing dots from the SNI (which is specified not to have any, see RFC
    6066, Section 3) and by not supporting multi-level wildcards, which are
    not a thing in the WebPKI (and in crypto/x509).

We should at least have a comment describing why we are ignoring this, but preferably
review whether we should still use it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-12 14:40:11 +02:00