upgrade_container: Put upgrade script in a PID name-space

Currently canceling the script with kill -9 won't kill any of it's
child processes, which means the script isn't really canceled in a
meaningful sense.

By making it PID 1 in a name-space, we ensure that when it exits (for
any reason) all it's child processes are killed.

BUG=chromium:1217902
TEST=Manually tested

Change-Id: I15857404ed1b656abca2ed727d552bccd71a7be1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/tremplin/+/3455206
Reviewed-by: David Munro <davidmunro@google.com>
Commit-Queue: Fergus Dall <sidereal@google.com>
Tested-by: Fergus Dall <sidereal@google.com>
Auto-Submit: Fergus Dall <sidereal@google.com>
2 files changed
tree: 372aa326e02d79e28e1f272682a1f410838b024b
  1. src/
  2. .gitignore
  3. OWNERS
  4. README.md
README.md

Tremplin

Tremplin is the “springboard” daemon that runs in the Termina VM and exposes a gRPC interface for managing LXD containers.