Commit Graph

4868 Commits

Author SHA1 Message Date
Lennart Poettering aa1936ea1a loginctl: restore cgroup display for status output
Same for machinectl.
2013-07-11 00:32:32 +02:00
Kay Sievers 8577e67245 shutdown: fix /proc/cmdline reading of 'quiet' 2013-07-11 00:13:46 +02:00
Lennart Poettering 66713f77e8 core: uninstall cgroup agent only if we are running outside of a container
Since the cgroupfs is currently not virtualized for containers we
shouldn't reset the hosts agent from the container.
2013-07-10 23:50:28 +02:00
Lennart Poettering ac9ef33358 cgroup: when uninstalling agent, actually turn it off first 2013-07-10 23:47:15 +02:00
Lennart Poettering 7fb3ee51c1 user-sessions: rely on PID 1 to kill sessions
As we want to centralized cgroup access we should stop killing the user
sessions directly from the systemd-user-sessions service. Instead, rely
on PID 1 doing this by adding the right ordering dependencies to the
session scope units.
2013-07-10 23:41:04 +02:00
Lennart Poettering f2d4f98d58 logind: when creating the scope job fails, return this immediately to the client that wants to register the session
Otherwise we'll hanging for the job to finish without any job existing.

Similar, for machined.
2013-07-10 23:41:03 +02:00
Lennart Poettering 6797c324a6 logind: don't misunderstand UnitRemoved signals during reloading
When PID 1 reloads the units logind/machined will see UnitRemoved
signals for all units. Instead of trusting these immediately, let's
check the actual unit state before considering a unit gone, so that
reloading PID 1 is not mistaken as the end of all sessions.
2013-07-10 23:41:03 +02:00
Lennart Poettering 72673e866a unit: when deserializing cgroup path add it back into cgroup hashmap
Also, properly remove cgroup path from hashmap when freeing unit.
2013-07-10 23:41:03 +02:00
Lennart Poettering b9316fb0f3 unit: save description/slice of transient units to /run
This is necessary so that these properties survive a daemon reload.
2013-07-10 23:41:03 +02:00
Lennart Poettering 71445ae75b core: send out "Reloading" signal before and after doing a full reload/reexec of PID 1
Since we'll unload all units/job during a reload, and then readd them it
is really useful for clients to be aware of this phase hence sent a
signal out before and after. This signal is called "Reloading" (despite
the fact that it is also sent out during reexecution, which we consider
a special case in this context) and has one boolean parameter which is
true for the signal sent before the reload, and false for the signal
after the reload. The UnitRemoved/JobRremoved and UnitNew/JobNew due to
the reloading are guranteed to be between the pair of Reloading
messages.
2013-07-10 23:41:03 +02:00
Lennart Poettering d0ede8f1c5 systemctl: suppress error message when doing "systemctl daemon-reexec"
When we issue a reexecution request via the private socket we need to
expect a "Disconnected" in addition to "NoReply" when the connection is
terminated.
2013-07-10 23:41:03 +02:00
Lennart Poettering 94c01aeb10 systemctl: suppress error messages when checking whether a unit needs to be reloaded 2013-07-10 23:41:03 +02:00
Lennart Poettering 0c5778a26b scope: don't require an initialized PIDs set when deserializing
When a scope unit is created due to deserialization rather than client
request don't enforce that the PIDs set must be non-empty, since the
cgroup is already populated.
2013-07-10 23:41:03 +02:00
Lennart Poettering b170dd803d core: while we are reloading don't suppress bus signals
While we are reloading we shouldn't suppress adding units to the bus
queue when there are no subscribers, simply because we might not have
deserialized the subscribers list yet. Hence, during reloading always
assume we have subscribers.
2013-07-10 23:41:03 +02:00
Lennart Poettering 6fa4853328 core: serialize/deserialize bus subscribers 2013-07-10 23:41:03 +02:00
Lennart Poettering 376dd21dc0 cgroup: downgrade error message when we cannot remove a cgroup to debug
Some units set KillMode=none to survive the initrd→rootfs transition. We
cannot remove their cgroups, but that shouldn't really be considered an
issue, so let's downgrade the error message.
2013-07-10 23:41:03 +02:00
Kay Sievers 9d7d42bc40 udev: add builtin 'keyboard' to manage key mappings 2013-07-10 22:52:55 +02:00
Kay Sievers 06639c0940 hwdb: allow list of lookup keys per given record
This allows to specify:
  dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Model 231*:pvr*
  dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Series 12*:pvr*
   KEY_A=value
   KEY_B=value

Instead of:
  dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Model 231*:pvr*
   KEY_A=value
   KEY_B=value

  dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Series 12*:pvr*
   KEY_A=value
   KEY_B=value
2013-07-10 15:05:05 +02:00
Kay Sievers beef8df837 hwdb: return false if no property is found 2013-07-09 15:48:36 +02:00
Tom Gundersen edeb68c53f static-nodes: move creation of static nodes from udevd to tmpfiles
As of kmod v14, it is possible to export the static node information from
/lib/modules/`uname -r`/modules.devname in tmpfiles.d(5) format.

Use this functionality to let systemd-tmpfilesd create the static device nodes
at boot, and drop the functionality from systemd-udevd.

As an effect of this we can move from systemd-udevd to systemd-tmpfiles-setup-dev:

 * the conditional CAP_MKNOD (replaced by checking if /sys is mounted rw)
 * ordering before local-fs-pre.target (see 89d09e1b5c)
2013-07-08 21:26:24 +02:00
Kay Sievers a4bbef0992 hwdb: add --lookup-prefix= option 2013-07-08 11:44:17 +02:00
Zbigniew Jędrzejewski-Szmek 19887cd06a man: document machinectl and systemd-machined 2013-07-06 22:23:31 -04:00
Zbigniew Jędrzejewski-Szmek 925d98b344 systemd-python: wrap sd_notify
_listen_fds() is modified to accept unset_environment arg as keyword,
to match new notify().
2013-07-05 22:50:42 -04:00
Zbigniew Jędrzejewski-Szmek a8b409dbc9 tests: add tests for string lookup tables
The tests check if the tables have entries for all values
in the enum, and that the entries are unique.
2013-07-05 01:36:16 -04:00
Kay Sievers ec26be514f suppress status message output at shutdown when 'quiet' is given 2013-07-05 00:32:05 +02:00
Kay Sievers c1eba3008c cgroups-agent: remove ancient fallback code; turn connection error into warning
During re-execution and shutdown cgroups agents might not be able
to connect to systemd's private D-Bus socket, the printed error to
the console is misleding in that case, so turn it into a warning.
2013-07-04 20:54:40 +02:00
Kay Sievers ad929bcc27 disable the cgroups release agent when shutting down
During shutdown, when we try to clean up all remaining processes, the
kernel will fork new agents every time a cgroup runs empty. These
new processes cause delays in the final SIGTERM, SIGKILL logic.

Apart from that, this should also avoid that the kernel-forked binaries
cause unpredictably timed access to the filesystem which we might need to
unmount.
2013-07-04 20:31:18 +02:00
Harald Hoyer 1e4fc9b1d8 core/mount.c:mount_dump(): don't segfault, if mount is not mounted anymore
Don't segfault, if m->from_proc_self_mountinfo and m->from_fragment is
false.

https://bugzilla.redhat.com/show_bug.cgi?id=957783#c9
2013-07-04 12:01:15 +02:00
Lennart Poettering c01995635d build-sys: bump/correct library versions 2013-07-03 16:37:39 +02:00
Lennart Poettering 943aca8efb logind/machined: properly notice when units are gc'ed 2013-07-03 15:14:47 +02:00
David Coppa 286ca4852e build-sys: rename LEGACY to NOLEGACY to better reflect meaning
https://bugs.freedesktop.org/show_bug.cgi?id=66542
2013-07-03 09:09:36 -04:00
Jason St. John e9c1ea9de8 replace tabs with spaces in various files
The affected files in this patch had inconsistent use of tabs vs. spaces
for indentation, and this patch eliminates the stray tabs.

Also, the opening brace of sigchld_hdl() in activate.c was moved so the
opening braces are consistent throughout the file.
2013-07-02 23:06:22 -04:00
Zbigniew Jędrzejewski-Szmek e79f68d11d journald: drop (deleted) from _EXE= fields
The kernel adds those when the file is deleted,
but we don't really care if the file is still there
or not. The downside is that if the filename ends
in ' (deleted)', this part of the filename will be
removed. Too bad.
2013-07-02 23:06:22 -04:00
Jason St. John e9dd9f9547 man: improve grammar and word formatting in numerous man pages
Use proper grammar, word usage, adjective hyphenation, commas,
capitalization, spelling, etc.

To improve readability, some run-on sentences or sentence fragments were
revised.

[zj: remove the space from 'file name', 'host name', and 'time zone'.]
2013-07-02 23:06:22 -04:00
Kay Sievers 6824690f14 hwdb: allow to query arbitrary keys 2013-07-03 00:23:41 +02:00
Dave Reisner 2c4c73b3ff machine: fix -Wmaybe-uninitialized warning
The return value of machine_start_scope might be undefined if m->scope
is non-NULL.
2013-07-02 13:50:54 -04:00
Dave Reisner aba8b84e8d machined: check correct return value for NULL 2013-07-02 13:44:50 -04:00
Lennart Poettering f526ab7ef0 machine: fix scope allocation 2013-07-02 18:38:26 +02:00
Lennart Poettering cf1265e188 core: make GC more aggressive
Since we should allow registering/unregistering transient units with the
same name in a tight-loop, we need to make the GC more aggressive, so
that dead units are cleaned up immediately instead of later.

hence, execute the GC sweep on every event loop iteration and clean up
units. This of course, means we need to be careful with adding units to
the GC queue, which we already are since we execute check_gc() of each
unit type already when adding something to the queue.
2013-07-02 17:46:57 +02:00
Lennart Poettering d0af76e68a logind: after deserializatio readd systemd units to unit-to-object hashmap correctly 2013-07-02 17:18:41 +02:00
Lennart Poettering 8b6fe8243d login: pass correct boolean type to libdbus 2013-07-02 17:18:41 +02:00
Dave Reisner 294a90cc4a dbus-scope: initialize variable before accessing 2013-07-02 10:44:02 -04:00
Lennart Poettering 06025d9148 core: don't consider a unit's cgroup empty if only a subcgroup runs empty 2013-07-02 16:24:13 +02:00
Lennart Poettering 8aec412ff6 machined: sync to /run after job completed 2013-07-02 15:49:27 +02:00
Lennart Poettering 97e67f1e52 machined: relax access to GetMachine() 2013-07-02 15:03:09 +02:00
Lennart Poettering 6a4e0b1347 nspawn: use the corect method signature for CreateMachine() 2013-07-02 15:02:54 +02:00
Lennart Poettering 51da82a781 machined: fix bus path unescaping 2013-07-02 03:58:28 +02:00
Lennart Poettering 1ee306e124 machined: split out machine registration stuff from logind
Embedded folks don't need the machine registration stuff, hence it's
nice to make this optional. Also, I'd expect that machinectl will grow
additional commands quickly, for example to join existing containers and
suchlike, hence it's better keeping that separate from loginctl.
2013-07-02 03:47:23 +02:00
Lennart Poettering 374ec6abf3 libsystemd-logind: fix detection of session/user/machine of a PID 2013-07-02 02:34:15 +02:00
Kay Sievers efffb13e00 keymap: Asus -- do not overwrite explicitely kernel driver defined keys
If key mappings are defined in the kernel driver, userspace must
not overwrite them. If something is wrong with the kernel-provided
values, the kernel driver shold be fixed instead.

Some of the matches are not the input device name but the kernel
driver name, which will not match anything.
2013-07-02 02:16:36 +02:00