| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
| |
Although it is nice to have it read ELOGIND instead of SYSTEMD, all
diffs just show too many irrelevant (false) positives.
|
|
|
|
|
| |
This is done for systems, which init systems are no cgroup
controllers. One example is runit on Void Linux.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous variant was nice and sleek. But unfortunately, there are
constructs like:
#if 0
(... old code ...)
#else
(... alternative code for elogind ...)
#endif // 0
These fragments couldn't be handled by the old code, but can by the
new one.
To make this work, the precompiler macros must be set like shown above.
Apart from that, all lines like:
/// Any doxygen one-line-comments with elogind in it are removed
are removed, too. Please note the three slashes.
And finally, all commented out #include directives are removed as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- src/shared/install.h - removed
- src/basic/unit-name.[hc] - cleaned
- src/core/cgroup.[hc] - cleaned
- src/libelogind/libelogind.sym - cleaned
- src/libelogind/sd-daemon/sd-daemon.c - cleaned
- src/shared/acl-util.[hc] - cleaned
- src/shared/bus-util.[hc] - cleaned
- src/shared/output-mode.h - cleaned
- src/shared/path-lookup.h - cleaned
- src/systemd/sd-daemon.h - cleaned
|
|
|
|
|
|
|
| |
a) Add some debugging messages to track what's going on with eloginds
cgroup handling.
b) Do not create a cgroup path "/elogind" if our cgroup root is
already "/elogind".
|
| |
|
|
|
|
|
| |
Add a highly reduced src/core/cgroup.[hc] to enable elogind to setup
cgroups for proper usage.
|
| |
|
| |
|
|
|
|
|
|
| |
This adds support for showing the accumulated consumed CPU time per-unit
in the "systemctl status" output. The property is also readable via the
bus.
|
|
|
|
| |
https://github.com/docker/docker/issues/10280
|
| |
|
| |
|
| |
|
|
|
|
| |
systemd[1]: Failed to set memory.limit_in_bytes on : Invalid argument
|
|
|
|
| |
mounted read-only
|
| |
|
|
|
|
|
|
|
| |
for leaf units
Otherwise a slice or delegation unit might move PIDs around ignoring the
fact that it is attached to a subcgroup.
|
|
|
|
| |
it's not quite as destructive as it sounds nowadays
|
|
|
|
|
|
|
|
|
| |
If a cgroup fails to be destroyed (most likely because there are still
processes running as part of a service after the main pid exits), don't
free and remove the cgroup unit from the manager. This fixes a
regression introduced by the cgroup rework in v205 where systemd would
forget about processes still running after the unit becomes inactive.
(This can happen when the main pid exits and KillMode=process or none).
|
|
|
|
|
| |
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno
+ return simplifications".
|
|
|
|
|
|
|
|
|
|
|
| |
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments.
|
| |
|
|
|
|
| |
It corrrectly handles both positive and negative errno values.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
subhierarchies
For priviliged units this resource control property ensures that the
processes have all controllers systemd manages enabled.
For unpriviliged services (those with User= set) this ensures that
access rights to the service cgroup is granted to the user in question,
to create further subgroups. Note that this only applies to the
name=systemd hierarchy though, as access to other controllers is not
safe for unpriviliged processes.
Delegate=yes should be set for container scopes where a systemd instance
inside the container shall manage the hierarchies below its own cgroup
and have access to all controllers.
Delegate=yes should also be set for user@.service, so that systemd
--user can run, controlling its own cgroup tree.
This commit changes machined, systemd-nspawn@.service and user@.service
to set this boolean, in order to ensure that container management will
just work, and the user systemd instance can run fine.
|
|
|
|
|
|
|
|
|
|
|
| |
systemctl would print 'CPUQuotaPerSecUSec=(null)' for no limit. This
does not look right.
Since USEC_INFINITY is one of the valid values, format_timespan()
could return NULL, and we should wrap every use of it in strna() or
similar. But most callers didn't do that, and it seems more robust to
return a string ("infinity") that makes sense most of the time, even
if in some places the result will not be grammatically correct.
|
|
|
|
|
|
|
|
| |
We'll stay in "initializing" until basic.target has reached, at which
point we will enter "starting".
This is preparation so that we can change the startip timeout to only
apply to the first phase of startup, not the full procedure.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Also add a bit of debugging output to help diagnose problems,
add missing units, and simplify cppflags.
Move test-engine to normal tests from manual tests, it should now
work without destroying the system.
|
|
|
|
|
|
|
|
|
| |
Only accept cpu quota values in percentages, get rid of period
definition.
It's not clear whether the CFS period controllable per-cgroup even has a
future in the kernel, hence let's simplify all this, hardcode the period
to 100ms and only accept percentage based quota values.
|
|
|
|
|
| |
This is the behaviour the kernel cgroup rework exposes for all
controllers, hence let's do this already now for all cases.
|
|
|
|
|
| |
Introduce a (unsigned long) -1 as "unset" state for cpu shares/block io
weights, and keep the startup unit set around all the time.
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to CPUShares= and BlockIOWeight= respectively. However only
assign the specified weight during startup. Each control group
attribute is re-assigned as weight by CPUShares=weight and
BlockIOWeight=weight after startup. If not CPUShares= or
BlockIOWeight= be specified, then the attribute is re-assigned to each
default attribute value. (default cpu.shares=1024, blkio.weight=1000)
If only CPUShares=weight or BlockIOWeight=weight be specified, then
that implies StartupCPUShares=weight and StartupBlockIOWeight=weight.
|
| |
|
|
|
|
|
| |
We should no longer pretend that we can run in any sensible way
without the kernel supporting us with cgroups functionality.
|
| |
|
|
|
|
|
| |
if PrivateDevices=yes is used we need to make sure we can still
create /dev/null and so on.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
safe_close() automatically becomes a NOP when a negative fd is passed,
and returns -1 unconditionally. This makes it easy to write lines like
this:
fd = safe_close(fd);
Which will close an fd if it is open, and reset the fd variable
correctly.
By making use of this new scheme we can drop a > 200 lines of code that
was required to test for non-negative fds or to reset the closed fd
variable afterwards.
|
| |
|
|
|
|
| |
hence don't bother
|
|
|
|
| |
particular devices nodes
|
| |
|
|
|
|
| |
Resolve spotted issues related to missing or extraneous commas, dashes.
|
|
|
|
| |
enabled when enabling/disabling cgroup controllers for units
|
|
|
|
|
|
|
| |
Previously a cgroup setting down tree would result in cgroup membership
additions being propagated up the tree and to the siblings, however a
unit could never lose cgroup memberships again. With this change we'll
make sure that both cgroup additions and removals propagate properly.
|
| |
|