Commit Graph

8052 Commits

Author SHA1 Message Date
dependabot[bot] 8d73e97d2d Bump rack from 2.0.6 to 2.2.8 in /images/benchmarks/ruby
Bumps [rack](https://github.com/rack/rack) from 2.0.6 to 2.2.8.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.0.6...v2.2.8)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 20:29:26 +00:00
Fabricio Voznika 8baec93b4c Add test case to TestCheckpointRestore
TestCheckpointRestore was testing that container can be restored into
a new one (e.g. clone) - twice. Change one of the restores to use the
same identity, to test the case where the same container is being saved
and then resumed at a later time.

PiperOrigin-RevId: 552866396
2023-08-01 11:34:17 -07:00
Andrei Vagin aa2c8c33c6 Implement setns for mount namespaces
PiperOrigin-RevId: 552859231
2023-08-01 11:12:29 -07:00
Kevin Krakauer 1f14891734 removed now-renamed bufferv2 package
PiperOrigin-RevId: 552835803
2023-08-01 10:03:58 -07:00
Jing Chen ab7259268b Add devices cgroups which is partially implemented. It could export the device cgroups to devices.deny and devices.allow, add/remove device cgroups rules will need to be implemented to fully support device cgroups.
PiperOrigin-RevId: 552673967
2023-07-31 21:22:07 -07:00
Andrei Vagin 41bb04c149 Implement mount namespaces
This change implements only the basic functions of mount namespaces.
All features that depends on user namespaces will be implemented separately.

PiperOrigin-RevId: 552673896
2023-07-31 21:12:21 -07:00
Lucas Manning e77ec6e719 Issue a panic in the case of a failed mount promise.
Failing to resolve a mount promise is never expected behavior. The
sandbox should crash in this case, since something has gone
fatally wrong.

PiperOrigin-RevId: 552652799
2023-07-31 18:57:25 -07:00
Lucas Manning 1d4792c566 Implement accel fd methods and gasket ioctls.
The implementation of memory mapping and interrupt registration is
very similar to what's already been done for nvproxy.

PiperOrigin-RevId: 552644264
2023-07-31 18:05:28 -07:00
Ayush Ranjan ee8df63a0a Fix args preparation for re-execution in boot and gofer process.
In runsc, the boot (runsc/cmd/boot.go) process and gofer (runsc/cmd/gofer.go)
process re-execute themselves (for various reasons). For re-execution, they
modify some flags in os.Args. There were certain issues with the process of
generating the args for re-execution that this patch aims to fix:
- In the gofer, we were not overwriting the flag if there was a conflict. This
  could lead to duplicate flags in the args with conflicting values.
- The arg manipulation (see old Boot.prepareArgs()) was kinda hacky in figuring
  out where to place new arguments.
- Arg manipulation was using `strings.Contains()` to figure out which flag to
  replace. This can be problematic when manipulating flags that are substrings
  of other flags (like --profile and --profile-mutex). This can also hurt when
  random flag values contain the flag name string.
- There was no common general utility to do this work.

This patch adds a generic `prepareArgs()` function to the cmd package which
can be used by boot and gofer and it fixes all the above-mentioned issues.

PiperOrigin-RevId: 552627805
2023-07-31 16:49:43 -07:00
Kevin Krakauer 8bccff393c netstack: fix flaky forwarding test
PiperOrigin-RevId: 552626894
2023-07-31 16:41:22 -07:00
Etienne Perot 8ab26ff0ce Update Redis version in Redis benchmark and test images.
PiperOrigin-RevId: 552623623
2023-07-31 16:30:08 -07:00
Fabricio Voznika 500658dc81 Return correct number of PIDs with multi-container
Updates #172

PiperOrigin-RevId: 552620987
2023-07-31 16:20:47 -07:00
Jing Chen 7f067c7e1d Implement setns CLONE_NEWIPC namespace type.
PiperOrigin-RevId: 552619565
2023-07-31 16:12:45 -07:00
Ayush Ranjan 7981df85f3 Make all custom flag.Value implementations idempotent.
Set(String()) should be an idempotent operation. This is a useful property
which allows us to generate args while re-execing the same process. Setting
`--flag-name=val.String()` should work.

PiperOrigin-RevId: 552598313
2023-07-31 14:53:21 -07:00
Andrei Vagin ef95be6e1c kernel: check that a task has a network namespace
task.GetNetworkNamespace has to be used when we try to access a remote task.

PiperOrigin-RevId: 552593738
2023-07-31 14:43:55 -07:00
Lucas Manning 5babda5341 Lock around endpoint info access in UDP onICMPError.
PiperOrigin-RevId: 552593077
2023-07-31 14:32:56 -07:00
Ayush Ranjan 3275e9086c Exclude internet/test-inspector-help-page.js nodejs runtime test.
This test fails with runc too. Seems like it is broken.

PiperOrigin-RevId: 552575861
2023-07-31 13:28:50 -07:00
Etienne Perot 3924579214 nginx config: Remove worker_processes and events.worker_connections.
This is closer to the default nginx settings with respect to concurrency.

Turn off access log, as it is heavy on I/O and would not be used in a
production setup (whether with or without gVisor).

Update nginx to version `1.25.1`.

PiperOrigin-RevId: 551669286
2023-07-27 16:16:08 -07:00
Kevin Krakauer 39d89e4a93 site: note that flags passed to run should be replicated for restore
PiperOrigin-RevId: 551588446
2023-07-27 11:21:55 -07:00
gVisor bot a3ae02eee3 Merge pull request #8990 from sitano:ivan_ptrace_eperm_guide
PiperOrigin-RevId: 551559276
2023-07-27 09:48:47 -07:00
Etienne Perot 9926c0f464 gVisor fio benchmarks: Use libaio where it makes sense.
Enforce that `IODepth` must be `1` when using the `sync` IO engine, since
it has no effect with that engine.

Also add unit names to `tools.Fio` struct fields for easier readability.

PiperOrigin-RevId: 550710273
2023-07-24 16:48:03 -07:00
Andrei Vagin 46115504ec Implement the setns syscall
This change introduces the nsfs file system. Each new namespace allocates
a new nsfs inode.

Here are reasons why we need these inodes:
* each namespace has to have an unique id.
* proc/pid/ns/ contains one entry for each namespace. Bind mounting one of
  the files in this directory to somewhere else in the filesystem keeps the
  corresponding namespace alive even if all processes currently in
  the namespace terminate.
* setns() allows the calling process to join an existing namespace specified
  by a file descriptor.

PiperOrigin-RevId: 550694515
2023-07-24 15:45:08 -07:00
Fabricio Voznika a5fd5015e9 Better memory reporting for multi-container
Right now, the entire sandbox memory is reported per-container, confusing
users and tools that aggregate per-container memory to compute sandbox/pod
memory. So instead, split memory usage amoung all containers in the
system, except for the root container which is ignored by K8s. This way
pod memory usage is shown correctly in graphs.

Updates #172

PiperOrigin-RevId: 550670618
2023-07-24 14:20:10 -07:00
Zach Koopmans 0ef88bbbd8 Fix fio "regex"s in buildkite file.
PiperOrigin-RevId: 550601194
2023-07-24 10:24:06 -07:00
Ivan Prisyazhnyy 71bfa2bd24 doc/faq/ptrace/attach: yama lsm supported mode 2023-07-24 14:58:50 +02:00