Bug 999120 - RFE: systemd should always create slice units
RFE: systemd should always create slice units
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks: systemd-containers
  Show dependency treegraph
 
Reported: 2013-08-20 14:58 EDT by Jóhann B. Guðmundsson
Modified: 2013-09-13 16:30 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-13 16:30:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jóhann B. Guðmundsson 2013-08-20 14:58:03 EDT
Description of problem:

I guess this warrants some discussion but I've come to the conclusion after testing/poking slices and scopes that we should always create machine slice unit/scope ( with some reasonable default resource limits ) when we run systemd-nspawn with the -M, --machine= parameters. 

If there is any reason why we should not do this by default I would love to hear it. 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Jóhann B. Guðmundsson 2013-08-22 18:58:28 EDT
So the more I poke slices the more I come to the conclusion that we should automatically create slice units for administrators as opposed to having them creating maintaining and keep tap on those units themselves but rather have them manage it through some tool ( like the proposed controlctl ). 

And never assign higher level cgroup option on anything but slices ( atleast not manually ) as in not down to unit type service level. 

/sys/fs/cgroup/

`-- systemd

    |-- machine.slice <alter resources here>

    |   `-- machine-f20.scope

    |       |-- application.slice  <alter resources here>
    |       |   |--httpd.service <not here>

    |       |-- system.slice  <alter resources here>

    |       |   |-- console-getty.service <not here>

    |       |   |-- systemd-journald.service <not here>

    |       |   

    |       `-- user.slice <alter resources here>

    |--application.slice  <alter resources here>

    |   |-- ntpd.service <not here>

    |-- system.slice  <alter resources here>

    |   |-- systemd-journald.service <not here>

    |   |-- systemd-udevd.service <not here>

    |   

    |

    `-- user.slice  <alter resources here>

        |-- user-1000.slice  <alter resources here>

        |   |-- systemd-user@1000.service <not here>

        |   |   |-- firefox.service <not here>
Comment 2 Lennart Poettering 2013-09-12 15:26:35 EDT
Not following. Can you elaborate please? What exactly are you asking for?
Comment 3 Jóhann B. Guðmundsson 2013-09-12 15:51:13 EDT
Basically administrator should not have to manually create units for OS containers. ( or there would be a switch that does that for them when they start they container )
Comment 4 Lennart Poettering 2013-09-12 17:46:06 EDT
But each machine gets a scope unit anyway, automatically. So what else do you need?
Comment 5 Jóhann B. Guðmundsson 2013-09-13 03:41:34 EDT
(In reply to Lennart Poettering from comment #4)
> But each machine gets a scope unit anyway, automatically. So what else do
> you need?

But scope unit is not something you manually alter nor is permanent is it? 

So let's say I want to assign or alter resources to the OS container and I assume there would be 2 ways of doing that 1. via command 2. by manually editing the unit for the OS container.

What I'm talking about here is automatically create the unit in step 2 which he he can later alter manually.
Comment 6 Lennart Poettering 2013-09-13 16:29:41 EDT
(In reply to Jóhann B. Guðmundsson from comment #5)
> (In reply to Lennart Poettering from comment #4)
> > But each machine gets a scope unit anyway, automatically. So what else do
> > you need?
> 
> But scope unit is not something you manually alter nor is permanent is it? 

Sure, we will read static config drop-ins, and it is fine to alter it at runtime. 

> So let's say I want to assign or alter resources to the OS container and I
> assume there would be 2 ways of doing that 1. via command 2. by manually
> editing the unit for the OS container.

systemctl set-property should have the same effect as dropping in a unit file .d snippet.

> What I'm talking about here is automatically create the unit in step 2 which
> he he can later alter manually.

Well, for scopes you won't get a unit file, but you will get drop-ins.
Comment 7 Lennart Poettering 2013-09-13 16:30:41 EDT
Anyway, I am pretty sure scopes already are good enough for what you want to do, and if they aren't we should fix that, hence closing this bug.

Note You need to log in before you can comment on or make changes to this bug.