Bug 63152 - Support environment as value of resource limits, or any value for that matter
Summary: Support environment as value of resource limits, or any value for that matter
Status: RESOLVED WONTFIX
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-05 09:12 UTC by Alon Bar-Lev
Modified: 2013-09-12 20:04 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Alon Bar-Lev 2013-04-05 09:12:25 UTC
Hello,

It looks like the non standard notation of environment variable is supported in partial of the values.

It would be great if customization can be done using environment file to all values within the unit.

Thanks!
Comment 1 Lennart Poettering 2013-09-12 18:18:49 UTC
Sorry, I don't understand a word, can you elaborate please?
Comment 2 Alon Bar-Lev 2013-09-12 19:41:41 UTC
(In reply to comment #1)
> Sorry, I don't understand a word, can you elaborate please?

Sure.

For example, the value of:
LimitCPU=, LimitFSIZE=, LimitDATA=, LimitSTACK=, LimitCORE=, LimitRSS=, LimitNOFILE=, LimitAS=, LimitNPROC=, LimitMEMLOCK=, LimitLOCKS=, LimitSIGPENDING=, LimitMSGQUEUE=, LimitNICE=, LimitRTPRIO=, LimitRTTIME=

Why can't I use ${env} as value?

Why does systemd limit the use of these variables to specific attributes?
Comment 3 Lennart Poettering 2013-09-12 19:59:29 UTC
Well, Environment= set environment variables, and we allow referenceing them with $FOO in command lines. But LimitCPU= is not an environment variable...

We have no intention to make systemd unit files a second shell language, so I am very conservative in adding more expansions than we already have unless there is a really really strong usecase for it.
Comment 4 Alon Bar-Lev 2013-09-12 20:01:06 UTC
(In reply to comment #3)
> Well, Environment= set environment variables, and we allow referenceing them
> with $FOO in command lines. But LimitCPU= is not an environment variable...
> 
> We have no intention to make systemd unit files a second shell language, so
> I am very conservative in adding more expansions than we already have unless
> there is a really really strong usecase for it.

The use case is simple, allowing a user to manage environment file to effect unit behaviour, without the need to re-sync the entire unit every upgrade.
Comment 5 Lennart Poettering 2013-09-12 20:04:01 UTC
Well, but our intention is that people just change the unit files, instead of adding numerous other levels of configuration. Also note that users can easily extend unit files without touching them using .d/ drop-ins.

To make this clear: we want unified configuration of units for common properties like resource limits, and not per-service configuration files that all work differently. So I am really convinced that we don't want what you are suggesting. Sorry.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.