<div dir="ltr">It seems that systemd-run does not start the process in the specified slice when starting a transient scope instead of a service.<div><br></div><div><div><br></div><div>I have created a test.slice, and started it:</div><div><br></div><div> # systemctl status test.slice</div><div> ● test.slice - Test slice</div><div> Loaded: loaded (/usr/lib/systemd/system/test.slice; static; vendor preset: disabled)</div><div> Active: active since Tue 2016-04-05 16:50:26 EDT; 2min 27s ago</div><div> Memory: 0B</div><div> </div><div> Apr 05 16:50:26 abrand04 systemd[1]: Created slice Test slice.</div><div> Apr 05 16:50:26 abrand04 systemd[1]: Starting Test slice.</div><div><br></div><div>When running a process using systemd-run,</div><div><br></div><div> # systemd-run --scope --slice=test --unit=test sleep 60 &</div><div> [1] 52359</div><div> # Running scope as unit test.scope.</div><div><br></div><div><br></div><div>the process is placed in the system.slice instead of the test.slice as specified in the systemd-run command.</div><div><br></div><div> # systemctl status test.scope</div><div> ● test.scope - /usr/bin/sleep 60</div><div> Loaded: loaded (/run/systemd/system/test.scope; static; vendor preset: disabled)</div><div> Drop-In: /run/systemd/system/test.scope.d</div><div> └─50-Description.conf</div><div> Active: active (running) since Tue 2016-04-05 16:56:04 EDT; 11s ago</div><div> Memory: 92.0K</div><div> CGroup: /system.slice/test.scope</div><div> └─52359 /usr/bin/sleep 60</div><div> </div><div> Apr 05 16:56:04 abrand04 systemd[1]: Started /usr/bin/sleep 60.</div><div> Apr 05 16:56:04 abrand04 systemd[1]: Starting /usr/bin/sleep 60.</div><div><br></div><div><br></div></div><div>I am running the latest version of CentOS 7, which ships systemd 219. A quick scan of the run.c history in github made it seem like there have been no changes since the introduction of this feature. Am I doing something wrong here? When starting the process as a service, and not a transient scope, the process is correctly placed in the specified slice.</div><div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div><br></div><div>Alexander Brand</div><div class="gmail_signature"><div dir="ltr"></div></div>
</div></div>