core: allow slice to be overriden if cgroups aren't realized (#3246)
authorTejun Heo <htejun@fb.com>
Sat, 14 May 2016 19:56:53 +0000 (15:56 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 14 May 2016 19:56:53 +0000 (15:56 -0400)
commit99e66921c86bce77d0d3587c201c7d1b611a7d99
treeea02e79efac1588dd58adb9d277215ddcaeafe2d
parent4b653dd2b3f07f9f8bc4b197b369b742178afd76
core: allow slice to be overriden if cgroups aren't realized (#3246)

unit_set_slice() fails with -EBUSY if the unit already has a slice associated
with it.  This makes it impossible to override slice through dropin config or
over dbus.  There's no reason to disallow slice changes as long as cgroups
aren't realized.  Fix it.

Fixes #3240.

Signed-off-by: Tejun Heo <htejun@fb.com>
Reported-by: Davide Cavalca <dcavalca@fb.com>
src/core/unit.c