]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: register a scope for the unit if --register=no is specified (#6166)
authorLennart Poettering <lennart@poettering.net>
Wed, 28 Jun 2017 17:22:46 +0000 (19:22 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 28 Jun 2017 17:22:46 +0000 (13:22 -0400)
commitcd2dfc6faea2a1e2370ae52460247bb6c8c553b1
treeb2def0db525ac57c4404e6c2beffa486f2d43e00
parent694859b5e74de0ad291453493b117c522b1e2ada
nspawn: register a scope for the unit if --register=no is specified (#6166)

Previously, only when --register=yes was set (the default) the invoked
container would get its own scope, created by machined on behalf of
nspawn. With this change if --register=no is set nspawn will still get
its own scope (which is a good thing, so that --slice= and --property=
take effect), but this is not done through machined but by registering a
scope unit directly in PID 1.

Summary:

--register=yes             → allocate a new scope through machined (the default)
--register=yes --keep-unit → use the unit we are already running in an register with machined
--register=no              → allocate a new scope directly, but no machined
--register=no --keep-unit  → do not allocate nor register anything

Fixes: #5823
man/systemd-nspawn.xml
src/nspawn/nspawn-register.c
src/nspawn/nspawn-register.h
src/nspawn/nspawn.c