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

64 Commits

Author SHA1 Message Date
Lennart Poettering
4cfa2c999d core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
Michal Schmidt
cbd37330bc dbus: register to DBus asynchronously
Chen Jie observed and analyzed a deadlock. Assuming systemd-kmsg-syslogd
is already stopped, but rsyslogd is not started yet:
 1. systemd makes a synchronous call to dbus-daemon.
 2. dbus-daemon wants to write something to syslog.
 3. syslog needs to be started by systemd.
   ... but cannot be, because systemd is waiting in 1.

Solve this by avoiding synchronous D-Bus calls. I had to write an async
bus registration call. Interestingly, D-Bus authors anticipated this, in
documentation to dbus_bus_set_unique_name():
> The only reason to use this function is to re-implement the equivalent
> of dbus_bus_register() yourself. One (probably unusual) reason to do
> that might be to do the bus registration call asynchronously instead
> of synchronously.

Lennart's comments from IRC:
> though I think this doesn't fix the problem in its entirety
> simply because dbus_connection_open_private() itself is still synchronous
> i.e. the connect() call behind it is not async
> I think I listed that issue actually on some D-Bus todo list
> i.e. to make dbus_connection_get() fully async
> but that's going to be hard
> so your patch looks good

So it may not be perfect, but it's clearly an improvement.
I did not manage to reproduce the original deadlock with the patch.
2011-12-20 00:17:14 +01:00
Lennart Poettering
27d340c772 fsck: show progress while fscking at boot 2011-09-01 21:05:06 +02:00
Lennart Poettering
a755605296 manager: merge serialization and desrialization counter into one, and increase it when reexecuting
Instead of having individual counters n_serializing and n_deserializing
have a single one n_reloading, which should be sufficient.

Set n_reloading when we are about to go down for reexecution to avoid
cgroup trimming when we free the units for reexecution.
2011-07-06 00:47:42 +02:00
Lennart Poettering
ab5c3e3ff1 english: s/_per_/_by_/ 2011-06-21 19:29:44 +02:00
Lennart Poettering
38c52d4606 cgroup: don't accidentaly trim on reload
https://bugzilla.redhat.com/show_bug.cgi?id=678555
2011-04-20 03:53:12 +02:00
Lennart Poettering
72bc8d0056 manager: fix taint check for /usr 2011-03-30 00:47:50 +02:00
Lennart Poettering
f1dd0c3f9b syslog: rework syslog detection so that we need no compile-time option what the name of the syslog implementation is 2011-03-18 04:53:31 +01:00
Harald Hoyer
35b8ca3aaf Spelling Corrections
Just some lame spelling corrections with no functionality.
2011-02-28 22:47:38 +01:00
Lennart Poettering
0a494f1ff3 exec: introduce global defaults for the standard output of services 2011-02-15 11:52:29 +01:00
Lennart Poettering
6a3b1508f7 getty: don't parse console= anymore, use /sys/class/tty/console/active instead 2011-02-14 19:57:18 +01:00
Lennart Poettering
59d1a83370 manager: bump up max number of units to 128K
https://bugzilla.redhat.com/show_bug.cgi?id=655857
2010-11-24 23:36:40 +01:00
Lennart Poettering
06d4c99ab3 manager: make list of default controllers configurable 2010-11-18 00:42:35 +01:00
Lennart Poettering
af2d49f70b drop support for MANAGER_SESSION, introduce MANAGER_USER instead 2010-11-15 22:13:26 +01:00
Lennart Poettering
5a1e99375d manager: hookup generators 2010-11-12 00:40:26 +01:00
Lennart Poettering
e9ddabc246 manager: parse RD_TIMESTAMP passed from initrd 2010-11-10 22:38:44 +01:00
Lennart Poettering
4e4343146a swap: listen for POLLPRI events on /proc/swaps if available 2010-10-18 23:09:09 +02:00
Fabiano Fidencio
b9080b03a9 manager: hookup execution of systemd-shutdown helper
(Modified by Lennart Poettering)
2010-10-14 00:52:26 +02:00
Lennart Poettering
e04aad61bb swap: major rework, use /sbin/swapon for setting up swaps, fix merging of aliased swap disks 2010-10-12 04:08:04 +02:00
Lennart Poettering
e983b76024 manager: notify plymouth about progress if it is running 2010-10-06 03:55:49 +02:00
Fabiano Fidencio
07459bb6b9 sysv: optionally disable of SysV init/rcN.d support at compile time
This patch adds a cpp definition HAVE_SYSV_COMPAT that is used to
isolate code dealing with /etc/init.d and /etc/rcN.d for systems where
it does not make sense (one that does not use sysv or one that is fully
systemd native).

The patch tries to be as little intrusive as possible, however in
order to minimize the number of #ifdef'ed regions I've reordered some
code in path-lookup.c:lookup_paths_init() where all code dealing with
sysv is now isolated under running_as == MANAGER_SYSTEM as well.

Moreover, In struct Service, some fields were rearranged to reduce
the number of ifdefs.

Lennart's suggestions were fixed and squashed with the original patch,
that was sent by Gustavo Sverzut Barbieri (barbieri@profusion.mobi).
2010-09-27 03:25:05 +02:00
Lennart Poettering
76bf48b7d0 dbus: export number of total failed jobs on D-Bus interface 2010-09-23 15:38:42 +02:00
Lennart Poettering
b0c918b97f manager: measure startup times 2010-09-21 04:14:38 +02:00
Lennart Poettering
e409f87570 manager: count how many jobs we executed 2010-09-21 03:51:31 +02:00
Lennart Poettering
8f6df3fa98 dbus: don't accept activation requests anymore if we are going down anyway 2010-09-01 03:30:59 +02:00
Matthew Miller
fdf20a3160 manager: add missing second part of s/maintenance/failed/ 2010-08-31 00:23:34 +02:00
Lennart Poettering
b2bb3dbed9 console: rework automatic getty on kernel console logic again
It is essential that the gettys are proper dependencies from
getty.target so that they aren't killed and immediately restarted on
runlevel changes. Hence rework the logic to implicitly add console
gettys to getty.target as dependencies.

This also adds an automatic hvc console for virtualizers.

https://bugzilla.redhat.com/show_bug.cgi?id=501720
2010-08-30 23:03:58 +02:00
Lennart Poettering
173a8d04fc mount: rework automatic mounting to follow the 'nofail' option in fstab 2010-08-25 20:37:04 +02:00
Lennart Poettering
d3689161a2 mount: add global configuration options for handling of auto mounts 2010-08-25 03:11:26 +02:00
Lennart Poettering
03467c88fb emacs: disable tabs in .h files, too 2010-08-17 03:50:18 +02:00
Lennart Poettering
7fab9d01b5 pahole: rearrange structs to make them smaller 2010-08-11 22:37:10 +02:00
Lennart Poettering
4927fcae48 audit,utmp: implement audit logic and rip utmp stuff out of the main daemon and into a helper binary 2010-08-11 01:44:38 +02:00
Lennart Poettering
6e98720f14 service: hide output of sysv scripts if quiet is passed on the kernel cmdline 2010-08-09 18:00:24 +02:00
Lennart Poettering
d8d5ab981a manager: write serialization to /dev/.systemd/ instead of /dev/shm 2010-07-20 20:54:33 +02:00
Lennart Poettering
8fe914ec81 device: do not merge devices
Don't try to merge devices that have been created via dependencies when
they appear in the system and can be recognized as the same.  Instead,
simply continue to maintain them independently of each other, however
with the same state cycle. Why? Because otherwise we'd have a hard time
to seperate the dependencies after the devices are unplugged again and
we hence cannot be sure anymore that next time the device is plugged in
it will carry the same names.

Example: if one depndency refers to dev-sda.device and another one to
dev-by-id-xxxyyy.device we only learn at time of plug in of the device
that it is actually the same device that was ment. In the moment the
device is unplugged again we won't know anymore their relation to each
other and the next time the harddisk is plugged it might even appear as
dev-by-id-xxxyyy.device and dev-sdb.service. To ensure the dependencies
continue to have the meaning they were intended to have let's hence keep
the .device objects seperate all the time, even when they are plugged
in.

This patch also introduces a new Following= property which points from
the various .device units of a specific device to the main .device unit
for it. This can be used by the client side to figure out the relation
of the .device units to each other and even filter units from display.
2010-07-20 20:33:24 +02:00
Lennart Poettering
5632e3743d systemctl: introduce reset-maintenance command 2010-07-19 04:08:07 +02:00
Lennart Poettering
faf919f1eb job: timeout every job independently of the unit 2010-07-17 04:09:28 +02:00
Lennart Poettering
9f611ad82e unit: disable retroactive starting/stopping of units when deserializing 2010-07-13 19:01:20 +02:00
Lennart Poettering
fe51822e71 manager: introduce unit path cache to minimize disk accesses 2010-07-11 00:52:00 +02:00
Lennart Poettering
c6c18be35b cgroup: kill processes, not tasks and other cgroup changes 2010-07-11 00:50:49 +02:00
Lennart Poettering
5509654721 cgroup: make cgroup controller name a constant 2010-07-10 17:38:50 +02:00
Lennart Poettering
82c64bf578 snapshot: fix deserialization 2010-07-10 04:51:03 +02:00
Lennart Poettering
398ef8ba02 dbus: make errors reported via D-Bus more useful 2010-07-08 02:43:18 +02:00
Lennart Poettering
7b97f47732 dbus: send reload completion message on right connection 2010-07-07 02:21:42 +02:00
Lennart Poettering
9e58ff9c5c manager: optionally print status updates to console on boot 2010-07-07 00:00:59 +02:00
Lennart Poettering
a567261a29 dbus: send signals about jobs to the clients having created them unconditionally, and thus get rid of broadcast signals in most cases 2010-07-05 00:58:07 +02:00
Lennart Poettering
f295f5c0c0 dbus: complete coverage of manager interface 2010-07-04 04:47:19 +02:00
Lennart Poettering
6398320759 core: rename struct timestamp to dual_timestamp to avoid name clash with IP system headers 2010-07-01 00:26:44 +02:00
Lennart Poettering
a3d4e06dfa manager: get rid of destinction between running_as=system and running_as=init, as there is little value in it and we cannot really test this 2010-06-19 03:15:59 +02:00
Lennart Poettering
5e8d1c9a9f dbus: to make sure that systemd stays controllable during early bootup, register our services on our own micro usb server in addition to the bus 2010-06-19 03:04:04 +02:00