Commit Graph
80 Commits
Author SHA1 Message Date
Lucas ManningandgVisor bot 33c1b3856d Fix debug builds.
This change also adds instructions for using a debugger with syscall tests.

Fixes #9039

PiperOrigin-RevId: 563576842
2023-09-07 16:28:00 -07:00
Bhautik e2e0272c51 docs(k8s): updated apiVersion for RuntimeClass 2023-08-17 18:32:05 +05:30
Kevin KrakauerandgVisor bot 4e5264a5e5 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 ef7a8556dc Merge pull request #8990 from sitano:ivan_ptrace_eperm_guide
PiperOrigin-RevId: 551559276
2023-07-27 09:48:47 -07:00
Ivan Prisyazhnyy 41c81b84da doc/faq/ptrace/attach: yama lsm supported mode 2023-07-24 14:58:50 +02:00
Etienne PerotandgVisor bot 02a519f527 Systrap is now the default gVisor platform. Update platform documentation.
PiperOrigin-RevId: 547983290
2023-07-13 18:27:34 -07:00
Etienne PerotandgVisor bot 14f360868f runsc: Make Systrap the default platform.
As per announced on gvisor-users:
https://groups.google.com/g/gvisor-users/c/OhGupJ5bTuo

PiperOrigin-RevId: 540085417
2023-06-13 15:09:54 -07:00
gVisor bot b0bdcc6d24 Merge pull request #9008 from stevenewald:master
PiperOrigin-RevId: 537452150
2023-06-02 18:00:39 -07:00
SteveandGitHub 4a2fea23df Update docker.md with fixed block quote 2023-06-02 14:16:50 -05:00
stevenewald 4255f0c7a9 Added warning regarding SELinux with the debugging runtime to documentation 2023-05-25 18:00:02 +00:00
Etienne PerotandgVisor bot fe30a21b1a runsc metric-server: Add metric to track the presence of capabilities.
PiperOrigin-RevId: 521848278
2023-04-04 13:25:30 -07:00
Etienne PerotandgVisor bot 508e63fbee runsc metric-server: Add query parameter to only export a subset of metrics.
This adds an optional `GET` parameter `runsc-sandbox-metrics-filter` which can
be used to filter the set of sandbox metrics requested from each sandbox. In
cases where the metric client isn't interested in learning everything about
the sandboxes, this saves on RPC cost and latency.

This also has the benefit of reducing memory usage of the `metric-server`
further, as it does not need to hold onto data that it will not export.

As the sandbox process is untrusted, the metrics returned are double-checked
on the `metric-server` side to ensure that the filter was respected.

PiperOrigin-RevId: 521055953
2023-03-31 18:11:38 -07:00
Etienne PerotandgVisor bot 961748630c runsc metric-server: Add name_ suffix to pod and namespace labels.
PiperOrigin-RevId: 516350308
2023-03-13 16:17:10 -07:00
Etienne PerotandgVisor bot cfb1fab95f runsc: Move --metric-server-allow-unknown-root flag to a subcommand flag.
Prior to this change, the `--metric-server-allow-unknown-root` flag was set
at the `runsc` top level, which made sense for the case where this needed to
be set in e.g. Docker runtime flags with auto-spawn. Since this is no longer
the supported mode, having this flag at the top level no longer makes sense.

This change moves this flag to be a subcommand flag of `runsc metric-server`
instead, and renames it to `--allow-unknown-root` (since it's obvious it's
about the metric server now).

This change is backwards-incompatible to anyone who was specifying this flag,
but as this feature is very new and this flag was never documented, hopefully
this isn't much of a disruption.

Same deal for `--metric-exporter-prefix`, though this one is used in the
`runsc export-metrics` subcommand as well, so duplicated it in both places.

PiperOrigin-RevId: 514580178
2023-03-06 18:10:23 -08:00
Adin ScannellandgVisor bot 2911d8c3b8 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -08:00
Etienne PerotandgVisor bot d9d266161a gvisor.dev: Add information about the systrap platform.
If you're interested in gVisor to the extent of reading this commit message,
please try out this platform and report about your experience!
[email protected]

This change also rewords Systrap's README file slightly.

PiperOrigin-RevId: 513042723
2023-02-28 14:40:01 -08:00
Etienne PerotandgVisor bot adaf4fc7be gvisor.dev: Update metric server documentation to have localhost as default.
PiperOrigin-RevId: 507928107
2023-02-07 17:27:41 -08:00
Ayush RanjanandgVisor bot b16662ccad Hide root overlay filestore from container using whiteout.
PiperOrigin-RevId: 507355437
2023-02-05 19:36:11 -08:00
Ayush RanjanandgVisor bot 6b0f87b532 Add self medium to overlay2.
This medium instructs runsc to place the overlay-backing host file inside the
mount being overlayed itself. The file is placed inside the root directory of
the mount at path `.gvisor.overlay.img.{CID}/filestore-{random}`.

Note that the same volume may be mounted at various places in the same
container. Furthermore, the same volume may be mounted by multiple containers
in the same pod. So we create a filestore directory in the mount which is
unique to each container. This filestore directory hosts all the filestore
files for the mount for the given container. This directory is destroyed along
with the contianer on `runsc delete`.

The self medium based host file is a named file because it needs to be
discoverable via path traversal from the host. For the root mount, this allows
k8s to scan the container's root filesystem and apply local ephemeral storage
limits appropriately. This makes self medium appropriate for k8s usage.

Note that the overlay host file (MemoryFile) is a sparse file. Thankfully k8s
uses stat.st_blocks to perform accounting, not stat.st_size. stat.st_blocks
indicates the number of pages allocated towards a file, which works well with
sparse files.

PiperOrigin-RevId: 507301254
2023-02-05 11:08:47 -08:00
Etienne PerotandgVisor bot 47cabb6462 Add documentation on how to use the gVisor Prometheus metric server.
PiperOrigin-RevId: 506472933
2023-02-01 17:57:40 -08:00
Ayush RanjanandgVisor bot 710955192d Add dir= prefix in overlay2 flag's medium.
This is to make it clear that the host file will be created inside this
directory. This also makes it look cleaner when other medium options are added
later.

PiperOrigin-RevId: 505033408
2023-01-26 22:56:52 -08:00
Fabricio VoznikaandgVisor bot 9092188ed6 Add K8s to Falco+gVisor tutorial
PiperOrigin-RevId: 492030619
2022-11-30 15:17:22 -08:00
329def4002 Add overlay2 flag in runsc.
--overlay2 flag supersedes --overlay flag. It allows more granular
configuration for overlayfs in runsc. It does so in two ways:

1. Allows to apply overlay on all mounts or only the root mount.
   --overlay applies overlay to all mounts.
2. Allows to specify if overlay's upper layer should be backed by
   container memory or disk. --overlay always used container memory.

Allowing tmpfs to be backed by a file on disk prevents the container
memory from bloating up. Note that the tmpfs filesystem tree will
still be stored in sentry memory.

Using overlay on the root filesystem, helps avoid expensive
communication with the gofer process. The root filesystem of the
container is not preserved across container lifecycle. So we don't
need to keep updating the host filesystem, which will anyways be
destroyed once the container is destroyed. It is wasted effort.
Instead we keep all the changes to the root filesystem in tmpfs which
is directly accessible by the sentry.

The host file is created as an unnamed file using O_TMPFILE. Support
has been added for sub-containers too. Save/restore support is
still lacking.

Co-authored-by: Andrei Vagin <[email protected]>
PiperOrigin-RevId: 491988485
2022-11-30 12:29:14 -08:00
Fabricio VoznikaandgVisor bot 9fba339af9 Fix EPERM with OCI quick start
Fixes #8106

PiperOrigin-RevId: 485960462
2022-11-03 13:40:17 -07:00
Ayush RanjanandgVisor bot e163b089f4 Update docs to reference LISAFS instead of 9P.
PiperOrigin-RevId: 484293317
2022-10-27 10:46:17 -07:00
Fabricio VoznikaandgVisor bot bc6609d0d1 Add landing page for Runtime Monitoring
PiperOrigin-RevId: 471033778
2022-08-30 10:49:01 -07:00
Michael Vorburger ⛑️andGitHub 71da11f6ca Fix minor typo in production.md 2022-08-17 17:28:08 -07:00
Fabricio VoznikaandgVisor bot 3a1aba2212 Add tutorial for using Falco with gVisor
PiperOrigin-RevId: 466984819
2022-08-11 10:12:27 -07:00
Etienne PerotandgVisor bot 8031c48662 gvisor.dev: Add Production Guide page.
This page does not document anything new, but it aims to be a
central document to list all the steps and considerations
necessary to run gVisor in a production environment.

This includes:

- How to make the decision to use sandboxing at all or not
  (which security benefits sandboxing bring, how to think
   about them).
- How to make the decision about which components to sandbox.
- What the security/performance tradeoffs are.
- How to minimize the performance impact.
- How to configure gVisor for best performance.

Also includes a crude comparative diagrams of various ways
to organize a typical production stack.

PiperOrigin-RevId: 466491023
2022-08-09 15:47:11 -07:00
Etienne PerotandgVisor bot 40855ad710 gvisor.dev: Update WordPress example to recommend not sandboxing the database.
PiperOrigin-RevId: 465654131
2022-08-05 14:58:25 -07:00
Etienne PerotandgVisor bot b5e6e71cd4 gvisor.dev: Update documentation around platforms.
- Explain the consequences of using KVM in a nested virtualization
environment.
- Mention GKE Sandbox proprietary platform.
- Fix command to check if the user is part of the `kvm` group.
- Small fixes here and there.

PiperOrigin-RevId: 465625190
2022-08-05 12:41:09 -07:00
Fabricio VoznikaandgVisor bot 0951a9f94c Update Wordpress Kubernetes instructions
They were still referencing the gcloud beta commands.

PiperOrigin-RevId: 464916524
2022-08-02 16:37:53 -07:00
Fabricio VoznikaandgVisor bot 71d8cb507b Reorder Quick Start to put easier stuff on the top
PiperOrigin-RevId: 464909911
2022-08-02 16:07:04 -07:00
gVisor bot ceffa582d1 Merge pull request #7836 from avagin:kvm-rwa
PiperOrigin-RevId: 463689007
2022-07-27 15:08:58 -07:00
Andrei Vagin 03d3268601 user_guide: don't recommend to set read/write for all on the kvm device
Signed-off-by: Andrei Vagin <[email protected]>
2022-07-26 15:54:01 -07:00
Harm-Jan.Blok ee90cfa92d Configuration needs to use options not option 2022-03-18 11:15:42 +01:00
Bhasker HariharanandgVisor bot a54c761cba Update compat list for tcpdump.
A libpcap change broke tcpdump support in gvisor. As a result tcpdump
w/ libpcap> 1.10 fails with gvisor.

Updates #6664, #6699

PiperOrigin-RevId: 401633061
2021-10-07 16:32:03 -07:00
Nicolas stig124 FORMICHELLA 18fc98ab41 Deprecating apt-key
As apt-key got deprecated in Debian 11 and will be deleted from Debian 12
Replace apt-key by the supported keyring + signed-by method

Related : docker/docker.github.io#11625
Debian wiki : https://wiki.debian.org/DebianRepository/UseThirdParty

Signed-off-by: Nicolas stig124 FORMICHELLA <[email protected]>
2021-09-19 15:35:22 +02:00
Ian LewisandgVisor bot f4a8305627 Fix required Linux version in networking docs.
PiperOrigin-RevId: 386093826
2021-07-21 14:19:59 -07:00
Etienne PerotandgVisor bot b62b379eb5 Update gVisor release signing key to a version that does not expire.
PiperOrigin-RevId: 385051420
2021-07-15 18:28:33 -07:00
Kevin KrakauerandgVisor bot bd3942cae6 clean up tcpdump TODOs
tcpdump is largely supported. We've also chose not to implement writeable
AF_PACKET sockets, and there's a bug specifically for promiscuous mode (#3333).

Fixes #173.

PiperOrigin-RevId: 380733686
2021-06-21 22:16:11 -07:00
Fabricio VoznikaandgVisor bot ebb6d84077 Add gcore to list of supported tools
PiperOrigin-RevId: 380636877
2021-06-21 12:24:36 -07:00
Ian LewisandgVisor bot c9ccedfdf2 Update debugging example
Update the debugging example to use make to make sure the debuggable `runsc`
binary is installed as a docker runtime before attempting to start a container.
Also use nginx as an example container and Accept as an example break point
since it's easy to trigger.

PiperOrigin-RevId: 379393892
2021-06-14 18:50:14 -07:00
Ian LewisandgVisor bot c66c7b849a Fix specific releases and update install instructions.
Fixes #6084

PiperOrigin-RevId: 376293659
2021-05-27 18:57:37 -07:00
Ian LewisandgVisor bot 962a3006c3 Add Knative Services tutorial
This adds a new short tutorial on how to run Knative services in gVisor by
enabling the runtime class feature flag for Knative.

Fixes #3634

PiperOrigin-RevId: 374999528
2021-05-20 19:43:06 -07:00
Ian LewisandgVisor bot 64c767de00 Use containerd v2 config format in docs
Fixes #5170

PiperOrigin-RevId: 371007691
2021-04-28 16:28:46 -07:00
Ian LewisandgVisor bot e2077f8772 Fix path to runsc in CNI tutorial.
PiperOrigin-RevId: 364931406
2021-03-24 18:01:05 -07:00
Adin ScannellandgVisor bot 82b32c50f2 Update apt repository to limit to supported architectures.
Fixes #5703

PiperOrigin-RevId: 364492235
2021-03-22 23:16:41 -07:00
gVisor bot eaa38b23af Merge pull request #5352 from weisdd:patch-1
PiperOrigin-RevId: 355449206
2021-02-03 12:00:49 -08:00
Naoki Oketani 66d7d2e282 chore(docs): remove an extra back quote 2021-01-27 21:28:58 +09:00