Commit Graph
5 Commits
Author SHA1 Message Date
Fabricio VoznikaandgVisor bot a1067e151a Use consistent naming for subcontainers
It was confusing to find functions relating to root and non-root
containers. Replace "non-root" and "subcontainer" and make naming
consistent in Sandbox and controller.

PiperOrigin-RevId: 384512518
2021-07-13 11:36:13 -07:00
Fabricio VoznikaandgVisor bot 0643f7e7bb Delete PID files right after they are read
The PID files are not used after they are read, so there is
no point in keeping them around until the shim is deleted.

Updates #6225

PiperOrigin-RevId: 382169916
2021-06-29 14:49:33 -07:00
Fabricio VoznikaandgVisor bot 0b39816a36 Improve stopped container handling
Getting state of a stopped container would fail and could lead containerd
to not detecting that the container had actually stopped. Now stopped and
deleted containers return `stopped` state.

Also makes other messages more consistent when container is stopped. Some
where still sending messages to runsc and failing in different ways. Now
they go through `initState` state machine like the other messages.

There are a few changes to improve debugability with it as well.

Fixes #5861

PiperOrigin-RevId: 380698513
2021-06-21 17:19:05 -07:00
Ayush RanjanandgVisor bot c3ff9f93bc [op] Replace syscall package usage with golang.org/x/sys/unix in pkg/.
The syscall package has been deprecated in favor of golang.org/x/sys.

Note that syscall is still used in the following places:
- pkg/sentry/socket/hostinet/stack.go: some netlink related functionalities
  are not yet available in golang.org/x/sys.
- syscall.Stat_t is still used in some places because os.FileInfo.Sys() still
  returns it and not unix.Stat_t.

Updates #214

PiperOrigin-RevId: 360701387
2021-03-03 10:25:58 -08:00
Fabricio VoznikaandgVisor bot 29ebab9ef0 Delete shim v1
gvisor-containerd-shim is not compatible with containerd 1.1 or earlier.
Starting from containerd 1.2, shim v2 is the preferred interface.

PiperOrigin-RevId: 351485556
2021-01-12 17:54:10 -08:00