nspawn: move payload to sub-cgroup first, then sync cgroup trees
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Mar 2019 17:57:53 +0000 (18:57 +0100)
committerThe Plumber <50238977+systemd-rhel-bot@users.noreply.github.com>
Fri, 22 May 2020 08:30:35 +0000 (10:30 +0200)
commit63e2cd09f2c266d9a67937f2d1c13d518c988312
tree53ceb65473618c582ef14f98cfe33dea27139676
parenta4035d7ebcb2bbc173a626f69798bedba03978b9
nspawn: move payload to sub-cgroup first, then sync cgroup trees

if we sync the legacy and unified trees before moving to the right
subcgroup then ultimately the cgroup paths in the hierarchies will be
out-of-sync... Hence, let's move the payload first, and sync then.

Addresses: https://github.com/systemd/systemd/pull/9762#issuecomment-441187979
(cherry picked from commit 27da7ef0d09e00eae821f3ef26e1a666fe7aa087)
(cherry picked from commit 8ee1465520ad49892a0a378626ef93abc03f4d4e)

Resolves: #1837423
src/nspawn/nspawn.c