machinctl/systemd-nspawn containers/processes end in wrong slice

Bug #1455828 reported by Erkan Yanar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Starting a Container via systemd-nspawn it is supposed to run in the machine.slice.
While on Fedora 21 (systemd 216) it works like expected.

In Unbuntu 15.04 (systemd 219)

Slice=system-systemd\x5cx2dnspawn.slice
ControlGroup=/system.slice/system-systemd\<email address hidden>

On Fedora 21:
Slice=machine.slice
ControlGroup=/machine.slice/machine-jessie.scope

Revision history for this message
Erkan Yanar (erkan-yanar) wrote :

Checked with fedora 22.
It is also wrong fedora 22 (systemd 219)

Revision history for this message
Martin Pitt (pitti) wrote :

Why is one wrong and the other right? I. e. what's the actual bug that's caused by this layout?

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Erkan Yanar (erkan-yanar) wrote :

The documentation claims machine.slice is the default.

man systemd-nspawn:
       --slice=
           Make the container part of the specified slice, instead of the default machine.slice

The machine.slice although still exists. So It is a doku bug? Is there a changlog telling it is going to change?

Regards
Erkan

Revision history for this message
Martin Pitt (pitti) wrote :

Hm, when I do this it seems to be correct:

$ sudo systemd-nspawn -b -D /tmp/schroot-wily-systemd/

"machinectl status schroot-wily-systemd" shows

            Unit: machine-schroot\x2dwily\x2dsystemd.scope
                  ├─12745 /lib/systemd/systemd
            [...]

and systemd-cgls shows

├─machine.slice
│ └─machine-schroot\x2dwily\x2dsystemd.scope
│ ├─12745 /lib/systemd/systemd
│ └─system.slice
[...]

If I run nspawn with --slice foo.slice I get

├─foo.slice
│ └─machine-schroot\x2dwily\x2dsystemd.scope
│ ├─12876 /lib/systemd/systemd
[...]

From what command is the output in the description?

Changed in systemd (Ubuntu):
importance: Undecided → Low
Revision history for this message
Erkan Yanar (erkan-yanar) wrote : Re: [Bug 1455828] Re: machinctl/systemd-nspawn containers/processes end in wrong slice

So you run a newer version?
plus.google.com/112206451048767236518/posts/SYAueyXHeEX

Regards
Erkan

On Tue, Jun 02, 2015 at 10:57:46AM -0000, Martin Pitt wrote:
> Hm, when I do this it seems to be correct:
>
> $ sudo systemd-nspawn -b -D /tmp/schroot-wily-systemd/
>
> "machinectl status schroot-wily-systemd" shows
>
> Unit: machine-schroot\x2dwily\x2dsystemd.scope
> ├─12745 /lib/systemd/systemd
> [...]
>
> and systemd-cgls shows
>
> ├─machine.slice
> │ └─machine-schroot\x2dwily\x2dsystemd.scope
> │ ├─12745 /lib/systemd/systemd
> │ └─system.slice
> [...]
>
> If I run nspawn with --slice foo.slice I get
>
> ├─foo.slice
> │ └─machine-schroot\x2dwily\x2dsystemd.scope
> │ ├─12876 /lib/systemd/systemd
> [...]
>
> >From what command is the output in the description?
>
> ** Changed in: systemd (Ubuntu)
> Importance: Undecided => Low
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1455828
>
> Title:
> machinctl/systemd-nspawn containers/processes end in wrong slice
>
> Status in systemd package in Ubuntu:
> Incomplete
>
> Bug description:
> Starting a Container via systemd-nspawn it is supposed to run in the machine.slice.
> While on Fedora 21 (systemd 216) it works like expected.
>
> In Unbuntu 15.04 (systemd 219)
>
> Slice=system-systemd\x5cx2dnspawn.slice
> ControlGroup=/system.slice/system-systemd\<email address hidden>
>
> On Fedora 21:
> Slice=machine.slice
> ControlGroup=/machine.slice/machine-jessie.scope
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1455828/+subscriptions

--
über den grenzen muß die freiheit wohl wolkenlos sein

Revision history for this message
Martin Pitt (pitti) wrote :

No, I'm running what is in Ubuntu 15.10 (not too different from 15.04), and we don't have that patch yet. Anyway, if that helps (you can easily apply it locally), that clarifies this matter for sure. :-) Thanks for digging out the link!

Changed in systemd (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 228-1ubuntu2

---------------
systemd (228-1ubuntu2) xenial; urgency=medium

  * Merge with Debian to fix FTBFS.

systemd (228-3) UNRELEASED; urgency=medium

  * debian/rules: Remove temporary debug output from test failures again. All
    Debian buildd kernels are recent enough now, but add a check for kernels
    older than 3.13 and ignore test failures for those.

systemd (228-2) unstable; urgency=medium

  * Remove wrong endianess conversion in test-siphash24 to fix FTBFS on
    big-endian machines.
  * Bump libseccomp-dev build dependency to indicate required versions for
    backporting to jessie. (Closes: #805497)

 -- Martin Pitt <email address hidden> Thu, 19 Nov 2015 12:41:25 +0100

Changed in systemd (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.