Commit Graph
26 Commits
Author SHA1 Message Date
Etienne PerotandgVisor bot fdee49a531 Update Redis version in Redis benchmark and test images.
PiperOrigin-RevId: 552623623
2023-07-31 16:30:08 -07:00
Fabricio VoznikaandgVisor bot 6f757f523b Add FIONREAD to host file description
Closes #8544

PiperOrigin-RevId: 535456427
2023-05-25 18:25:42 -07:00
Zach KoopmansandgVisor bot 822ae5ac8c Fix flakes in portforward test.
Attempt to fix flaky port forward test using "netstat" in the container
to check the a process is listening on the port before attempting to
connect.

Also, re-enable the test in a seperate job, but w/ a soft fail. This
will be removed later in favor of adding port-forward to integration
tests to remove the high overhead of starting a new job (scheduling,
compiling runsc, downloading images, etc).

PiperOrigin-RevId: 526135859
2023-04-21 14:28:31 -07:00
Zach KoopmansandgVisor bot 139bb8ab5d Add portforward stream mode.
Port forward stream mode will be used for k8s. Stream mode takes a
UNIX socket and donates a connected FD to the sandbox in question,
and returns. No proxy process is kept around to do the transfer
and the UDS will be returned to containerd as the address on which
to send i/o to the forwarded port.

PiperOrigin-RevId: 521823250
2023-04-04 11:46:21 -07:00
Zach KoopmansandgVisor bot b10d68072b Add portforward command to runsc
Add portforward comand so that we can use runsc to forward connections
to container ports. This will eventually be supported in k8s.

PiperOrigin-RevId: 520739913
2023-03-30 14:16:19 -07:00
Ayush RanjanandgVisor bot 0c516fed5c Add docker test for external UDS connect.
Serves as a regression test for #8126.
Our unit tests didn't catch the issue because they run runsc with the flag
-TESTONLY-unsafe-nonroot. Docker tests are more e2e, they run tests in Docker
containers.

Fixes #8126

PiperOrigin-RevId: 488945922
2022-11-16 08:26:21 -08:00
Andrei VaginandgVisor bot 010befecea buildkite: allow to run containerd tests on arm64
k8s.gcr.io/busybox:latest doesn't have the arm variant, so
let's use the upstream busybox and create /etc/recolv.conf symlink.

PiperOrigin-RevId: 450059917
2022-05-20 14:11:04 -07:00
Andrei VaginandgVisor bot 3e79ae41d3 Allow to run packetdrill and fsstress tests on arm64
PiperOrigin-RevId: 449900552
2022-05-19 21:33:59 -07:00
gVisor bot 8df2cd1ebf Merge pull request #7167 from zhlhahaha:2438
PiperOrigin-RevId: 433048695
2022-03-07 15:03:09 -08:00
Fabricio VoznikaandgVisor bot 9725ff1d9b Fix epoll_ctl(2) regular files and dirs
Linux behaves differently for regular files and dirs for poll(2)/select(2)
compared to epoll_ctl(2). The latter returns EPERM for file and dirs.
I've also changed host FDs to behave like the underlying FD in regards
to epoll to keep it compatible with docker.

Fixes #7134

PiperOrigin-RevId: 429412692
2022-02-17 15:12:36 -08:00
Howard Zhang 4609b69ac4 enable integrationtest image on MultiArch
Signed-off-by: Howard Zhang <[email protected]>
2022-02-10 20:20:21 +08:00
Fabricio VoznikaandgVisor bot cecd7315bc Don't eat error from epoll_ctl EPOLL_CTL_ADD
Docker maps stdin to `/dev/null` which doesn't support epoll. Host FD
was ignoring the error and suceeding the epoll_ctl call from the
container, giving false impressing that epoll would be notified.

This required plumbing failure to all waiter.Waitable.EventRegister
callers and implementers.

Closes #6795

PiperOrigin-RevId: 414797621
2021-12-07 12:36:00 -08:00
Fabricio VoznikaandgVisor bot 29f707e925 Implement ioctl(fd, FIONREAD) for host FDs
Closes #6796

PiperOrigin-RevId: 409013591
2021-11-10 17:07:06 -08:00
Ayush RanjanandgVisor bot 298aa1f485 [infra] Do not recompile integration test executables each time.
Instead build the executable into the image.

PiperOrigin-RevId: 355631672
2021-02-04 08:28:38 -08:00
Ayush RanjanandgVisor bot 0d48402cbc [vfs] Make sticky bit check consistent with Linux.
Our implementation of vfs.CheckDeleteSticky was not consistent with Linux,
specifically not consistent with fs/linux.h:check_sticky().

One of the biggest differences was that the vfs implementation did not
allow the owner of the sticky directory to delete files inside it that belonged
to other users.

This change makes our implementation consistent with Linux.

Also adds an integration test to check for this. This bug is also present in
VFS1.

Updates #3027

PiperOrigin-RevId: 355557425
2021-02-03 22:44:51 -08:00
Ayush RanjanandgVisor bot 59ea6223cb Make ubuntutest image x86 only.
PiperOrigin-RevId: 355315140
2021-02-02 21:06:39 -08:00
Ayush RanjanandgVisor bot 55426b2d71 [infra] Consolidate all ubuntu tests into one image.
This makes it easier to add more tests that run on Ubuntu. We can now just
add a bash script and call that from integration_test without having to set up
another image.

PiperOrigin-RevId: 355000410
2021-02-01 12:30:45 -08:00
Adin ScannellandgVisor bot 67340fe47b Add image presubmit tests and mark fsstress x86_64 only.
PiperOrigin-RevId: 353118942
2021-01-21 15:53:34 -08:00
Ayush RanjanandgVisor bot 07d02feb62 [infra] Attempt to fix Kokoro image workflow.
#5274 broke `make load-basic_fsstress` target. It works locally but for some
inconceivable reason it fails to build on Kokoro.

Error message:
```
Step 1/12 : FROM alpine
 ---> 1fca6fe4a1ec
Step 2/12 : RUN apk add git
 ---> Running in 109a5326259a
standard_init_linux.go:207: exec user process caused "no such file or directory"
The command '/bin/sh -c apk add git' returned a non-zero code: 1
make: *** [load-basic_fsstress] Error 1
tools/images.mk:149: recipe for target 'load-basic_fsstress' failed
```

Copied the approach from the following issue to achieve the same goal:
https://github.com/nodejs/docker-node/issues/586#issue-273737852.

PiperOrigin-RevId: 352602945
2021-01-19 10:46:59 -08:00
Fabricio VoznikaandgVisor bot 965370c28a Add fsstress tests
Updates #5273

PiperOrigin-RevId: 352088736
2021-01-15 14:51:51 -08:00
Peter JohnstonandgVisor bot c3b5ce0336 Support icmpv6 transport protocol
PiperOrigin-RevId: 346101076
2020-12-07 08:44:44 -08:00
Adin ScannellandgVisor bot ba7c2cca90 Improve multi-arch support.
This change allows Dockerfiles named Dockerfile.$(ARCH) and makes list-images
list only supported architectures.

Updates #2847

PiperOrigin-RevId: 336108293
2020-10-08 10:05:40 -07:00
Fabricio VoznikaandgVisor bot 4433196d83 Add LinkAt support to gofer
Updates #1198

PiperOrigin-RevId: 325350818
2020-08-06 18:16:21 -07:00
Jamie LiuandgVisor bot 320b258be7 Call lseek(0, SEEK_CUR) unconditionally in runsc fsgofer's Readdir(offset=0).
9P2000.L is silent as to how readdir RPCs interact with directory mutation. The
most performant option is for Treaddir with offset=0 to restart iteration,
avoiding needing to walk+open+clunk a new directory fid between invocations of
getdents64(2), and the VFS2 gofer client assumes this is the case. Make this
actually true for the runsc fsgofer.

Fixes #3344, #3345, #3355

PiperOrigin-RevId: 324090384
2020-07-30 15:02:22 -07:00
Adin ScannellandgVisor bot 8263dbfb0f Add standard entrypoints for test targets.
PiperOrigin-RevId: 322265513
2020-07-20 18:05:05 -07:00
Adin ScannellandgVisor bot e4cf551982 Standardize all Docker images.
This change moves all Docker images to a standard location, and abstracts the
build process so that they can be maintained in an automated fashion. This also
allows the images to be architecture-independent.

All images will now be referred to by the test framework via the canonical
`gvisor.dev/images/<name>`, where `<name>` is a function of the path within the
source tree.

In a subsequent change, continuous integration will be added so that the images
will always be correct and available locally.

In the end, using `bazel` for Docker containers is simply not possible. Given
that we already have the need to use `make` with the base container (for
Docker), we extend this approach to get more flexibility.

This change also adds a self-documenting and powerful Makefile that is intended
to replace the collection of scripts in scripts. Canonical (self-documenting)
targets can be added here for targets that understand which images need to be
loaded and/or built.

PiperOrigin-RevId: 308322438
2020-04-24 14:11:42 -07:00