Commit Graph

11435 Commits

Author SHA1 Message Date
Fu Wei
df41bf832e
Merge pull request #6679 from kzys/zuul-vote 2022-03-16 13:54:33 +08:00
Derek McGowan
42ff244b1f
Merge pull request #6683 from uthark/oatamanenko/docs
document log level and format
2022-03-15 22:33:39 -07:00
Oleg Atamanenko
fdb746442b document log level and format
Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
2022-03-15 21:00:58 -07:00
Eng Zer Jun
52d307ac13
test: remove redundant mountPoint
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-03-16 10:01:47 +08:00
Phil Estes
58bae86d8e
Merge pull request #6660 from henry118/shared-ns
Add shared content label to namespaces
2022-03-15 13:57:52 -07:00
Phil Estes
cf30a39353
Merge pull request #6562 from kzys/fieldpath
Add protoc-gen-go-fieldpath
2022-03-15 07:48:30 -07:00
songjiang han
2a0b2ee9eb fix: ctr run --cni get failed
when   user  executes ctr run --cni to start a container,it will call cni plugin to create network .But when user kills it,the network won’t be removed. if we run a container with same namespace and name again will trigger a bug. we should remove the network when user kills task if it enables cni plugin.

Fix:#6604

Signed-off-by: SongJiang Han <songjiang.dark@gmail.com>
2022-03-15 15:46:29 +08:00
Eng Zer Jun
18ec2761c0
test: use T.TempDir to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-03-15 14:03:50 +08:00
Phil Estes
ed4cc4b482
Merge pull request #6669 from henry118/gosec
Enable gosec linter for golangci-lint
2022-03-14 21:23:27 -07:00
Henry Wang
b8bf504e94 Enable gosec linter for golangci-lint
`gosec` linter is able to identify issues described in #6584

e.g.

$ git revert 54e95e6b88
[gosec dfc8ca1ec] Revert "fix Implicit memory aliasing in for loop"
 2 files changed, 2 deletions(-)

$ make check
+ proto-fmt
+ check
GOGC=75 golangci-lint run
containerstore.go:192:54: G601: Implicit memory aliasing in for loop. (gosec)
		containers = append(containers, containerFromProto(&container))
		                                                   ^
image_store.go:132:42: G601: Implicit memory aliasing in for loop. (gosec)
		images = append(images, imageFromProto(&image))
		                                       ^
make: *** [check] Error 1

I also disabled following two settings which prevent the linter to show a complete list of issues.

* max-issues-per-linter (default 50)
* max-same-issues (default 3)

Furthermore enabling gosec revealed many other issues. For now I blacklisted the ones except G601.

Will create separate tasks to address them one by one moving next.

Signed-off-by: Henry Wang <henwang@amazon.com>
2022-03-14 22:50:54 +00:00
Kazuyoshi Kato
2ddcb20193 Make OpenLab's CI jobs blocking
Since the jobs are relatively stable, we have official ARM binaries and
we could technically still ignore them, we should remove "voting: false"
from them.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-14 18:22:00 +00:00
Derek McGowan
9c65a30df4
Merge pull request #6668 from kzys/openlab-xfs
Make mkfs.xfs available on OpenLab's CI environment
2022-03-14 11:15:44 -07:00
Kazuyoshi Kato
50ca5727b2
Merge pull request #6519 from ginglis13/ctr-runtime-path
ctr: improve error relative shim path error msg
2022-03-14 09:49:27 -07:00
Kazuyoshi Kato
8e546c12f5
Merge pull request #6674 from fujitatomoya/bugfix-20220312-typo-under-cmd
typo fixes under cmd.
2022-03-14 09:39:32 -07:00
Kazuyoshi Kato
cc526a98a4 Make mkfs.xfs available on OpenLab's CI environment
Since 0d0b2bd4f, devmapper snapshotter needs mkfs.xfs to run all tests.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-14 16:37:39 +00:00
Tomoya.Fujita
ba1674389f typo fixes under cmd.
Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
2022-03-12 11:32:31 -08:00
Henry Wang
2e080bf491 Add shared content label to namespaces
Signed-off-by: Henry Wang <henwang@amazon.com>
2022-03-11 23:37:02 -08:00
Kazuyoshi Kato
d4641e1ce1
Merge pull request #6618 from TBBle/handle-device-host_path-on-windows
Handle CRI Device.HostPath on Windows
2022-03-11 14:53:54 -08:00
Paul "TBBle" Hampson
2a425990cf Implement --device idType://id for ctr run on Windows
Also fixes the issue that `ctr run` on Windows offered help for the
non-Windows implementation, but was silently ignored.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-12 08:16:43 +11:00
Paul "TBBle" Hampson
39d52118f5 Plumb CRI Devices through to OCI WindowsDevices
There's two mappings of hostpath to IDType and ID in the wild:
- dockershim and dockerd-cri (implicitly via docker) use class/ID
-- The only supported IDType in Docker is 'class'.
-- https://github.com/aarnaud/k8s-directx-device-plugin generates this form
- https://github.com/jterry75/cri (windows_port branch) uses IDType://ID
-- hcsshim's CRI test suite generates this form

`://` is much more easily distinguishable, so I've gone with that one as
the generic separator, with `class/` as a special-case.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-12 08:16:43 +11:00
Paul "TBBle" Hampson
6a25be94e9 CRI integration test for Windows Device mounts
This test takes advantage of the fact that when you tell Windows to
mount the GUID_DEVINTERFACE_DISPLAY_ADAPTER class, it will also mount
the host's device store into the container, even if there is no real GPU
on the host.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-12 08:16:43 +11:00
Kazuyoshi Kato
dc745fc1e5
Merge pull request #6666 from kzys/gha-lint-upgrade
Upgrade golangci-lint and its GitHub Action
2022-03-11 13:15:45 -08:00
Phil Estes
e3519cd48d
Merge pull request #6661 from TBBle/only-build-hcsshim-once
Don't build a second copy of containerd-shim-runhcs-v1.exe
2022-03-11 14:59:50 -05:00
Kazuyoshi Kato
622a35a4fa Upgrade golangci-lint and its GitHub Action
The GitHub Action is unstable especially on Windows (see #6618).
This change may not address the issue itself, but using the latest
version makes reporting the upstream the issue easier.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-11 19:49:06 +00:00
Kazuyoshi Kato
aa45f8ee81
Merge pull request #6569 from estesp/fix-normalize-test
Update TestNormalize to only test Windows platform
2022-03-11 11:31:22 -08:00
Kazuyoshi Kato
3cb4f5bae8
Merge pull request #6663 from tnqn/fix-link
Fix link in getting-started.md
2022-03-11 10:23:23 -08:00
Kazuyoshi Kato
375a217e79
Merge pull request #6423 from AdamKorcz/fuzz17
Fuzzing: refactor metadata fuzzers
2022-03-11 10:19:55 -08:00
Phil Estes
e771443845
Merge pull request #6650 from henry118/xfs
Two xfs file systems with same UUID can not be mounted on the same sy…
2022-03-11 09:43:10 -05:00
Quan Tian
59b1871b30 Fix link in getting-started.md
Signed-off-by: Quan Tian <qtian@vmware.com>
2022-03-11 22:29:44 +08:00
Paul "TBBle" Hampson
88de65112a Don't build a second copy of containerd-shim-runhcs-v1.exe
`make binaries` already builds containerd-shim-runhcs-v1.exe next to
containerd.exe, so there's no need to spend time checking out and
building it again.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-11 20:36:56 +11:00
Phil Estes
8047eb2fca
Merge pull request #6635 from gabriel-samfira/fix-deadline-exceeded-in-daemon-restart
[Windows] Fix deadline exceeded in daemon restart
2022-03-10 12:30:38 -05:00
Phil Estes
807ded41f0
Update TestNormalize to only test Windows
The output of platforms.DefaultSpec() and the normalized version of the
default platform on 32- and 64-bit ARM are not comparable. This test
was added to validate not losing Windows-specific information during
normalize of the platform object, so for now we are moving this to be a
Windows-only test until we resolve the right behavior on ARM.

Signed-off-by: Phil Estes <estesp@amazon.com>
2022-03-10 11:38:10 -05:00
Phil Estes
a25a84f39a
Merge pull request #6658 from gabriel-samfira/use-temp-file-for-import-export-test
Use temp file for export/import test
2022-03-10 11:27:27 -05:00
Gabriel Adrian Samfira
80bc32f069
Use temp file for export/import test
Using a bytes buffer for this test increases the memory usage on Windows
to over 3 GB. Using a temporary file as a destination for the image
keeps memory usage at a reasonable level.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-03-10 11:48:38 +02:00
Henry Wang
0d0b2bd4fe Mount devmapper xfs file system with "nouuid" option.
Two xfs file systems with same UUID can not be mounted on the same system.
However devmapper snapshots will have same UUID as original filesystem.

This patch fixes the bug by mounting a xfs file system with "nouuid" option.

Signed-off-by: Henry Wang <henwang@amazon.com>
2022-03-10 00:05:39 +00:00
Phil Estes
b521429b67
Merge pull request #6495 from thaJeztah/improve_versions
strip path-info from `-v` (version) output, and implement -v flag for containerd-shim
2022-03-08 13:57:34 -05:00
Phil Estes
4fbdb40236
Merge pull request #6617 from FabHof/main
Improve unexpected response error handling in resolver
2022-03-08 13:28:50 -05:00
Phil Estes
b0075c98d5
Merge pull request #6601 from gabriel-samfira/set-lates-image-tag
Use the latest tag for azure images
2022-03-08 12:50:29 -05:00
Gabriel Adrian Samfira
14901335c1
Increase wait timeout for TestDaemonRestart
Windows needs a bit more time to finish the restarting containerd. With
the current 2 second timeout, we run the risk of exceeding that
deadline.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-03-08 18:09:42 +02:00
Gabriel Adrian Samfira
718adfe06b
Use the latest image for Windows test workers
This updates the Windows test worker images to the latest one available
in Azure. The updated images contain security and bug fixes.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-03-08 14:55:44 +02:00
Phil Estes
f18880a0ed
Merge pull request #6626 from TBBle/run-cri_integration-tests-in-GitHub_Actions
Run CRI integration tests in GitHub Actions (Windows)
2022-03-07 13:15:42 -05:00
Fabian Hoffmann
894e780014
Improve ErrUnexpectedStatus default string
Signed-off-by: Fabian Hoffmann <fabian.hoffmann@posteo.de>
2022-03-07 09:46:25 +01:00
Paul "TBBle" Hampson
48b478381e Skip most of script/setup/prepare_env_windows.ps1
Apart from crictl and go-junit-report, this script is just making the
remote test VMs look like GitHub Actions VMs, i.e. git, make-mingw32,
golang.

And we don't use go-junit-report, so we can save a lot of time (about
five minutes) by just extracting the interesting part.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-06 19:27:38 +11:00
Paul "TBBle" Hampson
768bf73dd1 Enable cri-tools critest on Windows
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-06 19:26:49 +11:00
Paul "TBBle" Hampson
59b9788479 Enable CRI Integration tests on Windows
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-06 17:32:25 +11:00
Paul "TBBle" Hampson
5b78a9a8f1 Remove hardcoded /tmp in tempfile paths
There's no specific need mentioned at the points it was added, and it
makes the Windows-hosted test run setup slightly weird.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-06 17:32:25 +11:00
Phil Estes
5427aec4f1
Merge pull request #6595 from zhsj/fix-cri-test
cri: fix integration test on cgroupsv2 system
2022-03-04 13:20:45 -05:00
Phil Estes
f6694f5b27
Merge pull request #6613 from sachaos/feature/use-version-2-config-in-doc
Use version 2 configuration format in docs/PLUGINS.md
2022-03-04 13:19:26 -05:00
Takumasa Sakao
03a5e648bc Use version 2 config and mention containerd config command
Signed-off-by: Takumasa Sakao <tsakao@zlab.co.jp>
2022-03-05 02:22:30 +09:00
Akihiro Suda
c61186d473
Merge pull request #6619 from thaJeztah/bump_go_1.17.8
update to go 1.16.15, 1.17.8 to address CVE-2022-24921
2022-03-05 02:19:08 +09:00