Age | Commit message (Collapse) | Author |
|
Now that objects of all unit types are allocated the exact amount of
memory they need, the Unit union has lost its purpose. Remove it.
"Unit" is a more natural name for the base unit class than "Meta", so
rename Meta to Unit.
Access to members of the base class gets simplified.
|
|
Blocking on D-Bus in a system manager could lead to deadlock.
|
|
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.
|
|
|
|
|
|
|
|
|
|
detection
|
|
|
|
|
|
|
|
We simply keep open copies of the dbus connections across the
reexecution and close them as last step of it. A client can thus simply
wait until its connection is dropped to know when the reexecution is
finished.
https://bugzilla.redhat.com/show_bug.cgi?id=698198
|
|
|
|
|
|
Instead of the /dev/.run trick we have currently implemented, we decided
to move the early-boot runtime dir to /run.
An existing /var/run directory is bind-mounted to /run. If /var/run is
already a symlink, no action is taken.
An existing /var/lock directory is bind-mounted to /run/lock.
If /var/lock is already a symlink, no action is taken.
To implement the directory vs. symlink logic, we have a:
ConditionPathIsDirectory=
now, which is used in the mount units.
Skipped mount unit in case of symlink:
$ systemctl status var-run.mount
var-run.mount - Runtime Directory
Loaded: loaded (/lib/systemd/system/var-run.mount)
Active: inactive (dead)
start condition failed at Fri, 25 Mar 2011 04:51:41 +0100; 6min ago
Where: /var/run
What: /run
CGroup: name=systemd:/system/var-run.mount
The systemd rpm needs to make sure to add something like:
%pre
mkdir -p -m0755 /run >/dev/null 2>&1 || :
or it needs to be added to filesystem.rpm.
Udev -git already uses /run if that exists, and is writable at bootup.
Otherwise it falls back to the current /dev/.udev.
Dracut and plymouth need to be adopted to switch from /dev/.run to run
too.
Cheers,
Kay
|
|
|
|
Now that we have /dev/.run there's no need to use abstract namespace
sockets. So, let's move things to /dev/.run, to make things more easily
discoverable and improve compat with chroot() and fs namespacing.
|
|
PropertyReadOnly errors
|
|
|
|
The patch adds framework for processing Set requests on properties
and as first consumers allows setting of LogTarget and LogLevel on
interface org.freedesktop.systemd1.Manager of org.freedesktop.systemd1.
The code should be generic enough to allow processing of any
property on other objects and interfaces as well.
No systemctl visible interface is added so far. The LogTarget and
LogLevel are meant for debugging in the first place; user interface
can be added if other usage emerge.
Set on systemwide systemd is restricted to root; I am not sure
how session level access is controlled.
|
|
Just some lame spelling corrections with no functionality.
|
|
|
|
|
|
Thanks to 'trapni' on IRC for tracking this down.
|
|
|
|
|
|
activation loop
|
|
|
|
|
|
|
|
|
|
|
|
RefuseManualStop=
Some unit shall never be start on user request (e.g. shutdown.target)
others never be stopped on user request (e.g. auditd.servce), hence
offer options for both.
|
|
init proces
|
|
|
|
|
|
one for testing purposes
|
|
|
|
disconnects
|
|
logging is disabled, for diagnostic purposes
|
|
|
|
unconditionally, and thus get rid of broadcast signals in most cases
|
|
|
|
|
|
|
|
|
|
running_as=init, as there is little value in it and we cannot really test this
|
|
register our services on our own micro usb server in addition to the bus
|
|
|
|
|