1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
Commit Graph

11597 Commits

Author SHA1 Message Date
Lennart Poettering
1508e85878 dbus: fix minor memory leak when sending job change signals 2013-06-28 03:47:40 +02:00
Lennart Poettering
241da3287d unit: make sure the dropins we write are high-priority 2013-06-28 00:41:24 +02:00
Lennart Poettering
74c964d369 dbus: hookup runtime property changes for mouns, services, sockets, swaps too 2013-06-27 23:21:21 +02:00
Lennart Poettering
7041efe960 dbus: make DeviceAllow=/DevicePolicy= writable 2013-06-27 23:13:17 +02:00
Lennart Poettering
b42defe3b8 dbus: make more cgroup attributes runtime settable 2013-06-27 21:50:35 +02:00
Lennart Poettering
8e2af47840 dbus: add infrastructure for changing multiple properties at once on units and hook some cgroup attributes up to it
This introduces two bus calls to make runtime changes to selected bus
properties, optionally with persistence.

This currently hooks this up only for three cgroup atributes, but this
brings the infrastructure to add more changable attributes.

This allows setting multiple attributes at once, and takes an array
rather than a dictionary of properties, in order to implement simple
resetting of lists using the same approach as when they are sourced from
unit files. This means, that list properties are appended to by this
call, unless they are first reset via assigning the empty list.
2013-06-27 21:14:56 +02:00
Jan Janssen
aae72d6fa0 journal-verify: Use proper printf placeholder 2013-06-27 10:55:19 -04:00
Jan Janssen
3b18ae6866 test: Add list testcase 2013-06-27 01:38:47 -04:00
Lennart Poettering
4ad490007b core: general cgroup rework
Replace the very generic cgroup hookup with a much simpler one. With
this change only the high-level cgroup settings remain, the ability to
set arbitrary cgroup attributes is removed, so is support for adding
units to arbitrary cgroup controllers or setting arbitrary paths for
them (especially paths that are different for the various controllers).

This also introduces a new -.slice root slice, that is the parent of
system.slice and friends. This enables easy admin configuration of
root-level cgrouo properties.

This replaces DeviceDeny= by DevicePolicy=, and implicitly adds in
/dev/null, /dev/zero and friends if DeviceAllow= is used (unless this is
turned off by DevicePolicy=).
2013-06-27 04:17:34 +02:00
Lennart Poettering
abb26902e4 core: don't do runaway fork()s if we hit a segfault from our segfault handler 2013-06-27 04:17:33 +02:00
Zbigniew Jędrzejewski-Szmek
5841bd803f killall: do not use alloca() in argument list
It is not allowed.
2013-06-26 19:52:00 -04:00
Zbigniew Jędrzejewski-Szmek
7ac4fa7e92 journalctl: highlight MESSAGE= in verbose output
When looking at verbose output, additional "work" is required to
pick out the interesting MESSAGE= lines from all the fields.

Also, show long fields in full in verbose output mode when
OUTPUT_FULL_WIDTH is specified.
2013-06-26 19:52:00 -04:00
Zbigniew Jędrzejewski-Szmek
785a51eb68 man: add CONSTANTS section to systemd.directives(7) 2013-06-26 19:52:00 -04:00
Zbigniew Jędrzejewski-Szmek
74d005783e man: use <constant> for various constants which look ugly with quotes 2013-06-26 19:47:34 -04:00
Zbigniew Jędrzejewski-Szmek
909f413d3c man: always supply quotes around literals
When manpages are displayed on a terminal, <literal>s are indistinguishable
from surrounding text. Add quotes everywhere, remove duplicate quotes,
and tweak a few lists for consistent formatting.

https://bugzilla.redhat.com/show_bug.cgi?id=874631
2013-06-26 08:05:14 -04:00
Harald Hoyer
3b05b8b3b5 systemctl: conform to LSB with the "status" return code
check for pid file existance before returning 1
2013-06-25 16:28:00 +02:00
David King
aed63d6758 man: Small language improvements to sd_journal_open 2013-06-25 07:52:01 -04:00
Harald Hoyer
175728c45f systemctl: conform to LSB with the "status" return code
http://fedoraproject.org/wiki/Packaging:SysVInitScript#Exit_Codes_for_the_Status_Action

https://bugzilla.redhat.com/show_bug.cgi?id=975016
2013-06-25 13:08:27 +02:00
Zbigniew Jędrzejewski-Szmek
9d64774057 journald: always vacuum empty offline files
Corrupted empty files are relatively common. I think they are created
when a coredump for a user who never logged anything before is
attempted to be written, but the write does not succeed because the
coredump is too big, but there are probably other ways to create
those, especially if the machine crashes at the right time.
Non-corrupted empty files can also happen, e.g. if a journal file is
opened, but nothing is ever successfully written to it and it is
rotated because of MaxFileSec=. Either way, each "empty" journal file
costs around 3 MB, and there's little point in keeping them around.
2013-06-24 21:06:06 -04:00
Zbigniew Jędrzejewski-Szmek
670b110c3b journald: fix space limits reporting
Reporting of the free space was bogus, since the remaining space
was compared with the maximum allowed, instead of the current
use being compared with the maximum allowed. Simplify and fix
by reporting limits directly at the point where they are calculated.

Also, assign a UUID to the message.
2013-06-24 21:06:06 -04:00
Zbigniew Jędrzejewski-Szmek
30cb029b8b journal/vacuum: cleanup 2013-06-24 21:06:06 -04:00
Jan Janssen
9c3fd04e7d libudev: Use correct type for sizeof 2013-06-24 12:41:01 +02:00
Zbigniew Jędrzejewski-Szmek
92fba83e3a journal-verify: allow unlinked data entries
Sometimes an entry is not successfully written, and we end up with
data items which are "unlinked", not connected to, and not used by any
entry. This will usually happen when we write to write a core dump,
and the initial small data fields are written successfully, but
the huge COREDUMP= field is not written. This situation is hard
to avoid, but the results are mostly harmless. Thus only warn about
unused data items.

Also, be more verbose about why journal files failed verification.
This should help diagnose journal failure modes without resorting
to a hexadecimal editor.

https://bugs.freedesktop.org/show_bug.cgi?id=65235 (esp. see
system.journal attached to the bug report).
2013-06-22 20:36:01 -04:00
Michael Biebl
fb69ed55e5 man: Fix small typo 2013-06-22 00:55:18 +02:00
Lennart Poettering
f123dba8b1 update TODO 2013-06-21 15:57:57 +02:00
Lennart Poettering
96ca81944e tmpfiles: fix error check 2013-06-21 15:57:57 +02:00
Lennart Poettering
7f1ad696a2 journald: bump the journal per-unit ratelimit defaults
Too many people kept hitting them, so let's increase the limits a bit.

https://bugzilla.redhat.com/show_bug.cgi?id=965803
2013-06-21 15:57:57 +02:00
Martin Pitt
f6c9f322e8 keymap: Apply to all Latitude and Precision models
https://launchpad.net/bugs/1193147
2013-06-21 06:34:38 +02:00
Zbigniew Jędrzejewski-Szmek
2d0b2e8765 journalctl,systemctl: show messages tagged with OBJECT_SYSTEMD_[USER_]_UNIT
Replace mallocs with alloca while at it.
2013-06-20 23:03:58 -04:00
Zbigniew Jędrzejewski-Szmek
fdcd37df3b Make sure we only show authentic coredump messages
Before we only checked the MESSAGE_ID and COREDUMP_UNIT.
Those are both user-controlled fields.

For COREDUMP_USER_UNIT, relax the rules a bit, and also
allow messages from _UID=0.
2013-06-20 23:03:58 -04:00
Zbigniew Jędrzejewski-Szmek
968f319679 journal: allow callers to specify OBJECT_PID=
When journald encounters a message with OBJECT_PID= set
coming from a priviledged process (UID==0), additional fields
will be added to the message:

OBJECT_UID=,
OBJECT_GID=,
OBJECT_COMM=,
OBJECT_EXE=,
OBJECT_CMDLINE=,
OBJECT_AUDIT_SESSION=,
OBJECT_AUDIT_LOGINUID=,
OBJECT_SYSTEMD_CGROUP=,
OBJECT_SYSTEMD_SESSION=,
OBJECT_SYSTEMD_OWNER_UID=,
OBJECT_SYSTEMD_UNIT= or OBJECT_SYSTEMD_USER_UNIT=.

This is for other logging daemons, like setroubleshoot, to be able to
augment their logs with data about the process.

https://bugzilla.redhat.com/show_bug.cgi?id=951627
2013-06-20 23:03:58 -04:00
Zbigniew Jędrzejewski-Szmek
fd59d9f298 Add hasprefix macro to check prefixes of fixed length 2013-06-20 23:03:58 -04:00
Lennart Poettering
1021b21bc6 login: add an api to determine the slice a PID is located in to libsystemd-login 2013-06-21 01:46:27 +02:00
Auke Kok
ed002560a1 core: only attempt to connect to a session bus if one likely exists. 2013-06-20 23:37:04 +02:00
Lennart Poettering
3d3ee759e6 update TODO 2013-06-20 23:32:13 +02:00
Lennart Poettering
78894537e0 man: fix example for DefaultEnvironment=
The example mentioned Environment= rather than DefaultEnvironment=.

Also made some other clean-ups.
2013-06-20 23:31:21 +02:00
Lennart Poettering
3c86d34cf1 man: document that shutdown() is only sometimes OK on sockets passed in via socket activation 2013-06-20 23:25:41 +02:00
Umut Tezduyar
97d0e5f83b manager: add DefaultEnvironment option
This complements existing functionality of setting variables
through 'systemctl set-environment', the kernel command line,
and through normal environment variables for systemd in session
mode.
2013-06-20 16:27:45 -04:00
Zbigniew Jędrzejewski-Szmek
8c1396b1c2 journalctl: show lines in full with --all
In 31f7bf1 "logs-show: print multiline messages", I forgot
to take into account the fact that --all implies --full for
journalctl.
2013-06-20 16:15:04 -04:00
Harald Hoyer
6c10d39970 kernel-install: filter out "initrd=" from /proc/cmdline 2013-06-20 15:47:19 +02:00
Zbigniew Jędrzejewski-Szmek
b3629c7da0 logind: uninitialized variable 2013-06-20 00:51:10 -04:00
Zbigniew Jędrzejewski-Szmek
ac34b3af13 build-sys: make intltool and distcheck happy 2013-06-20 00:50:22 -04:00
Zbigniew Jędrzejewski-Szmek
bd5a54582a nspawn: '-C' option has been removed
Fixup for 9444b1f "logind: add infrastructure to keep track of
machines, and move to slices."
2013-06-20 00:05:52 -04:00
Lennart Poettering
ba73ed858f sd-login: update machine enumeration/notifications APIs for new /run/systemd/machines/ 2013-06-20 04:03:38 +02:00
Lennart Poettering
5caef0fc19 logind: make ListMachines bus call public 2013-06-20 04:00:28 +02:00
Lennart Poettering
9444b1f20e logind: add infrastructure to keep track of machines, and move to slices
- This changes all logind cgroup objects to use slice objects rather
  than fixed croup locations.

- logind can now collect minimal information about running
  VMs/containers. As fixed cgroup locations can no longer be used we
  need an entity that keeps track of machine cgroups in whatever slice
  they might be located. Since logind already keeps track of users,
  sessions and seats this is a trivial addition.

- nspawn will now register with logind and pass various bits of metadata
  along. A new option "--slice=" has been added to place the container
  in a specific slice.

- loginctl gained commands to list, introspect and terminate machines.

- user.slice and machine.slice will now be pulled in by logind.service,
  since only logind.service requires this slice.
2013-06-20 03:49:59 +02:00
Łukasz Stelmach
77f40f165c Describe handling of an AF_UNIX socket
Describe how to handle an AF_UNIX socket, with Accept set to false,
received from systemd, upon exit.

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2013-06-19 15:24:05 -07:00
Zbigniew Jędrzejewski-Szmek
c25b1ee6cd core/dbus: properly export cgroup properties on sockets
https://bugs.freedesktop.org/show_bug.cgi?id=65945
2013-06-19 18:09:54 -04:00
Zbigniew Jędrzejewski-Szmek
422fa6500a cgls,loginctl,systemctl: fix -l
Fixup for 98a6e13 "journalctl,loginctl,systemctl,systemd-cgls: add -l
as alias for --full".
2013-06-19 18:08:14 -04:00
Lennart Poettering
fe004b7c3a journal: add references to SSKG paper FSS is based on 2013-06-18 16:25:11 +02:00