b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
6bf0f408e4833152197fb38fb10a9989c89f3a59 |
|
10-Feb-2016 |
Lennart Poettering <lennart@poettering.net> |
core: make the StartLimitXYZ= settings generic and apply to any kind of unit, not just services
This moves the StartLimitBurst=, StartLimitInterval=, StartLimitAction=, RebootArgument= from the [Service] section
into the [Unit] section of unit files, and thus support it in all unit types, not just in services.
This way we can enforce the start limit much earlier, in particular before testing the unit conditions, so that
repeated start-up failure due to failed conditions is also considered for the start limit logic.
For compatibility the four options may also be configured in the [Service] section still, but we only document them in
their new section [Unit].
This also renamed the socket unit failure code "service-failed-permanent" into "service-start-limit-hit" to express
more clearly what it is about, after all it's only triggered through the start limit being hit.
Finally, the code in busname_trigger_notify() and socket_trigger_notify() is altered to become more alike.
Fixes: #2467 |
7a7821c878a6ddfb2e79268bb1cd8f7662a9b8f8 |
|
04-Feb-2016 |
Lennart Poettering <lennart@poettering.net> |
core: rework job_get_timeout() to use usec_t and handle USEC_INFINITY time events correctly |
a483fb59a8dd908a3e4b20d62410d022d511eaa8 |
|
01-Feb-2016 |
Lennart Poettering <lennart@poettering.net> |
core: store for each unit when the last low-level unit state change took place
This adds a new timestamp field to the Unit struct, storing when the last low-level state change took place, and make
sure this is restored after a daemon reload. This new field is useful to allow restarting of per-state timers exactly
where they originally started. |
9d06297e262966de71095debd1537fc223f940a3 |
|
24-Nov-2015 |
Harald Hoyer <harald@redhat.com> |
core: Do not bind a mount unit to a device, if it was from mountinfo
If a mount unit is bound to a device, systemd tries to umount the
mount point, if it thinks the device has gone away.
Due to the uevent queue and inotify of /proc/self/mountinfo being two
different sources, systemd can never get the ordering reliably correct.
It can happen, that in the uevent queue ADD,REMOVE,ADD is queued
and an inotify of mountinfo (or libmount event) happend with the
device in question.
systemd cannot know, at which point of time the mount happend in the
ADD,REMOVE,ADD sequence.
The real ordering might have been ADD,REMOVE,ADD,mount
and systemd might think ADD,mount,REMOVE,ADD and would umount the
mountpoint.
A test script which triggered this behaviour is:
rm -f test-efi-disk.img
dd if=/dev/null of=test-efi-disk.img bs=1M seek=512 count=1
parted --script test-efi-disk.img \
"mklabel gpt" \
"mkpart ESP fat32 1MiB 511MiB" \
"set 1 boot on"
LOOP=$(losetup --show -f -P test-efi-disk.img)
udevadm settle
mkfs.vfat -F32 ${LOOP}p1
mkdir -p mnt
mount ${LOOP}p1 mnt
... <dostuffwith mnt>
Without the "udevadm settle" systemd unmounted mnt while the script was
operating on mnt.
Of course the question is, why there was a REMOVE in the first place,
but this is not part of this patch. |
71d35b6b5563817dfbe757ab9e3b9f018b2db491 |
|
18-Nov-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
tree-wide: sort includes in *.h
This is a continuation of the previous include sort patch, which
only sorted for .c files. |
0f13f3bd7918b84955eaa0ceeea0f964877a93f7 |
|
17-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
core: move check whether a unit is suitable to become transient into unit.c
Lets introduce unit_is_pristine() that verifies whether a unit is
suitable to become a transient unit, by checking that it is no
referenced yet and has no data on disk assigned. |
702d4e6f14b0c92f7325fcdc3650c79c2221849e |
|
13-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
core: now that .snapshot unit are gone, we don't need the per-type .no_gc bool anymore |
36b4a7ba555540edb7648e0f97019280b4ac38de |
|
11-Nov-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Remove snapshot unit type
Snapshots were never useful or used for anything. Many systemd
developers that I spoke to at systemd.conf2015, didn't even know they
existed, so it is fairly safe to assume that this type can be deleted
without harm.
The fundamental problem with snapshots is that the state of the system
is dynamic, devices come and go, users log in and out, timers fire...
and restoring all units to some state from the past would "undo"
those changes, which isn't really possible.
Tested by creating a snapshot, running the new binary, and checking
that the transition did not cause errors, and the snapshot is gone,
and snapshots cannot be created anymore.
New systemctl says:
Unknown operation snapshot.
Old systemctl says:
Failed to create snapshot: Support for snapshots has been removed.
IgnoreOnSnaphost settings are warned about and ignored:
Support for option IgnoreOnSnapshot= has been removed and it is ignored
http://lists.freedesktop.org/archives/systemd-devel/2015-November/034872.html |
9ff1a6f1d61d4569920d5b75c88cf1c2ad9adaae |
|
10-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
core: change type of distribute_fds() prototype to return void
We can't handle errors of thisc all sanely anyway, and we never actually
return any errors from the unit type that implements the call. Hence,
let's make this void, in order to simplify things. |
ba64af90ecf48f7653a04bf3af1291385c9a69b8 |
|
10-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
core: change return value of the unit's enumerate() call to void
We cannot handle enumeration failures in a sensible way, hence let's try
hard to continue without making such failures fatal, and log about it
with precise error messages. |
b250ea2fd6fe35242a7d161a3b37bb756ae87be0 |
|
19-Oct-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
tree-wide: remove unused functions |
9806e87da22d0025d7c427907202e5751a6b5989 |
|
17-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
unit: allocate bus name match string on the stack
Let's use strjoina() rather than strjoin() for construct dbus match
strings.
Also, while we are at it, fix parameter ordering, so that our functions
always put the object first, like it is customary for OO-like
programming. |
a34ceba66fc0e856d8f76f340389a4768b57a365 |
|
08-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
core: add support for setting stdin/stdout/stderr for transient services
When starting a transient service, allow setting stdin/stdout/stderr fds
for it, by passing them in via the bus.
This also simplifies some of the serialization code for units. |
978c8b6347d61f5a792886ef1875a4df625fd65f |
|
28-Sep-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Move UnitActiveState to basic/
Preparation to allow systemctl to query the list of unit states. |
32ee7d3309816994a02b3ff000e9734120d71214 |
|
16-Sep-2015 |
Daniel Mack <daniel@zonque.org> |
cgroup: add support for net_cls controllers
Add a new config directive called NetClass= to CGroup enabled units.
Allowed values are positive numbers for fix assignments and "auto" for
picking a free value automatically, for which we need to keep track of
dynamically assigned net class IDs of units. Introduce a hash table for
this, and also record the last ID that was given out, so the allocator
can start its search for the next 'hole' from there. This could
eventually be optimized with something like an irb.
The class IDs up to 65536 are considered reserved and won't be
assigned automatically by systemd. This barrier can be made a config
directive in the future.
Values set in unit files are stored in the CGroupContext of the
unit and considered read-only. The actually assigned number (which
may have been chosen dynamically) is stored in the unit itself and
is guaranteed to remain stable as long as the unit is active.
In the CGroup controller, set the configured CGroup net class to
net_cls.classid. Multiple unit may share the same net class ID,
and those which do are linked together. |
efdb02375beb0a940c3320865572913780b4d7de |
|
01-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
core: unified cgroup hierarchy support
This patch set adds full support the new unified cgroup hierarchy logic
of modern kernels.
A new kernel command line option "systemd.unified_cgroup_hierarchy=1" is
added. If specified the unified hierarchy is mounted to /sys/fs/cgroup
instead of a tmpfs. No further hierarchies are mounted. The kernel
command line option defaults to off. We can turn it on by default as
soon as the kernel's APIs regarding this are stabilized (but even then
downstream distros might want to turn this off, as this will break any
tools that access cgroupfs directly).
It is possibly to choose for each boot individually whether the unified
or the legacy hierarchy is used. nspawn will by default provide the
legacy hierarchy to containers if the host is using it, and the unified
otherwise. However it is possible to run containers with the unified
hierarchy on a legacy host and vice versa, by setting the
$UNIFIED_CGROUP_HIERARCHY environment variable for nspawn to 1 or 0,
respectively.
The unified hierarchy provides reliable cgroup empty notifications for
the first time, via inotify. To make use of this we maintain one
manager-wide inotify fd, and each cgroup to it.
This patch also removes cg_delete() which is unused now.
On kernel 4.2 only the "memory" controller is compatible with the
unified hierarchy, hence that's the only controller systemd exposes when
booted in unified heirarchy mode.
This introduces a new enum for enumerating supported controllers, plus a
related enum for the mask bits mapping to it. The core is changed to
make use of this everywhere.
This moves PID 1 into a new "init.scope" implicit scope unit in the root
slice. This is necessary since on the unified hierarchy cgroups may
either contain subgroups or processes but not both. PID 1 hence has to
move out of the root cgroup (strictly speaking the root cgroup is the
only one where processes and subgroups are still allowed, but in order
to support containers nicey, we move PID 1 into the new scope in all
cases.) This new unit is also used on legacy hierarchy setups. It's
actually pretty useful on all systems, as it can then be used to filter
journal messages coming from PID 1, and so on.
The root slice ("-.slice") is now implicitly created and started (and
does not require a unit file on disk anymore), since
that's where "init.scope" is located and the slice needs to be started
before the scope can.
To check whether we are in unified or legacy hierarchy mode we use
statfs() on /sys/fs/cgroup. If the .f_type field reports tmpfs we are in
legacy mode, if it reports cgroupfs we are in unified mode.
This patch set carefuly makes sure that cgls and cgtop continue to work
as desired.
When invoking nspawn as a service it will implicitly create two
subcgroups in the cgroup it is using, one to move the nspawn process
into, the other to move the actual container processes into. This is
done because of the requirement that cgroups may either contain
processes or other subgroups. |
d79200e26ee39d4b451f95e876fc4595df51fe51 |
|
31-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
unit: unify how we assing slices to units
This adds a new call unit_set_slice(), and simplifies
unit_add_default_slice(). THis should make our code a bit more robust
and simpler. |
35b7ff80e29524cb01f881ca6d52c669970c88f1 |
|
31-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
unit: add new macros to test for unit contexts |
21b735e798c580e7af8c33ace9f8565860b7f8df |
|
28-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
core: add unit_dbus_interface_from_type() to unit-name.h
Let's add a way to get the type-specific D-Bus interface of a unit from
either its type or name to src/basic/unit-name.[ch]. That way we can
share it with the client side, where it is useful in tools like cgls or
machinectl.
Also ports over machinectl to make use of this. |
bbc2908635ca3ded9162504683fa126809f0ec14 |
|
06-Aug-2015 |
Daniel Mack <daniel@zonque.org> |
core: dbus: track bus names per unit
Currently, PID1 installs an unfiltered NameOwnerChanged signal match, and
dispatches the signals itself. This does not scale, as right now, PID1
wakes up every time a bus client connects.
To fix this, install individual matches once they are requested by
unit_watch_bus_name(), and remove the watches again through their slot in
unit_unwatch_bus_name().
If the bus is not available during unit_watch_bus_name(), just store
name in the 'watch_bus' hashmap, and let bus_setup_api() do the installing
later. |
d1a34ae9c20f1c02aab17884919eccef572b1d21 |
|
21-Jul-2015 |
Michal Schmidt <mschmidt@redhat.com> |
core: fix confusing logging of instantaneous jobs
For instantaneous jobs (e.g. starting of targets, sockets, slices, or
Type=simple services) the log shows the job completion
before starting:
systemd[1]: Created slice -.slice.
systemd[1]: Starting -.slice.
systemd[1]: Created slice System Slice.
systemd[1]: Starting System Slice.
systemd[1]: Listening on Journal Audit Socket.
systemd[1]: Starting Journal Audit Socket.
systemd[1]: Reached target Timers.
systemd[1]: Starting Timers.
...
The reason is that the job completes before the ->start() method returns
and only then does unit_start() print the "Starting ..." message.
The same thing happens when stopping units.
Rather than fixing the order of the messages, let's just not emit the
Starting/Stopping message at all when the job completes instantaneously.
The job completion message is sufficient in this case. |
ed10fa8ce2e9cc4b78adb257a1b8fdc636bacea9 |
|
19-May-2015 |
Lennart Poettering <lennart@poettering.net> |
unit: drop support for pre-v44 job serialization
No distro ships that old systemd versions anyway, hence let's drop
support for live-upgrades for them. Offline updates are still supported.
And live-upgrades will only lose the job queue, hence basically still
work... |
67bfdc9771ce9d67b6ecff9982d2ecb89bdb2f6b |
|
19-May-2015 |
Lennart Poettering <lennart@poettering.net> |
core: also enforce ratelimiter if we stop a unit due to BindsTo=
This extends on bea355dac94e82697aa98e25d80ee4248263bf92, and extends
the ratelimiter to not only be used for StopWhenUnneeded=1 units but
also for units that have BindsTo= on a unit that is dead.
http://lists.freedesktop.org/archives/systemd-devel/2015-April/030224.html |
f8a30ce524df4e2b71c2e3362e2cc83a8dcf41bf |
|
19-May-2015 |
Lennart Poettering <lennart@poettering.net> |
core: use bitfield where possible |
bea355dac94e82697aa98e25d80ee4248263bf92 |
|
19-May-2015 |
Lennart Poettering <lennart@poettering.net> |
core: enforce a ratelimiter when stopping units due to StopWhenUnneeded=1
Otherwise we might end up in an endless stop loop.
http://lists.freedesktop.org/archives/systemd-devel/2015-April/030224.html |
8b4305c7354f572fa0390b7580ba30af741aa0a5 |
|
11-May-2015 |
Lennart Poettering <lennart@poettering.net> |
unit: move unit_warn_if_dir_nonempty() and friend to unit.c
The call is only used by the mount and automount unit types, but that's
already enough to consider it generic unit functionality, hence move it
out of mount.c and into unit.c. |
f2341e0a87cab1558c84c933956e9181d5fb6c52 |
|
11-May-2015 |
Lennart Poettering <lennart@poettering.net> |
core,network: major per-object logging rework
This changes log_unit_info() (and friends) to take a real Unit* object
insted of just a unit name as parameter. The call will now prefix all
logged messages with the unit name, thus allowing the unit name to be
dropped from the various passed romat strings, simplifying invocations
drastically, and unifying log output across messages. Also, UNIT= vs.
USER_UNIT= is now derived from the Manager object attached to the Unit
object, instead of getpid(). This has the benefit of correcting the
field for --test runs.
Also contains a couple of other logging improvements:
- Drops a couple of strerror() invocations in favour of using %m.
- Not only .mount units now warn if a symlinks exist for the mount
point already, .automount units do that too, now.
- A few invocations of log_struct() that didn't actually pass any
additional structured data have been replaced by simpler invocations
of log_unit_info() and friends.
- For structured data a new LOG_UNIT_MESSAGE() macro has been added,
that works like LOG_MESSAGE() but prefixes the message with the unit
name. Similar, there's now LOG_LINK_MESSAGE() and
LOG_NETDEV_MESSAGE().
- For structured data new LOG_UNIT_ID(), LOG_LINK_INTERFACE(),
LOG_NETDEV_INTERFACE() macros have been added that generate the
necessary per object fields. The old log_unit_struct() call has been
removed in favour of these new macros used in raw log_struct()
invocations. In addition to removing one more function call this
allows generated structured log messages that contain two object
fields, as necessary for example for network interfaces that are
joined into another network interface, and whose messages shall be
indexed by both.
- The LOG_ERRNO() macro has been removed, in favour of
log_struct_errno(). The latter has the benefit of ensuring that %m in
format strings is properly resolved to the specified error number.
- A number of logging messages have been converted to use
log_unit_info() instead of log_info()
- The client code in sysv-generator no longer #includes core code from
src/core/.
- log_unit_full_errno() has been removed, log_unit_full() instead takes
an errno now, too.
- log_unit_info(), log_link_info(), log_netdev_info() and friends, now
avoid double evaluation of their parameters |
1c2e9646e4a1720fc8ad35c705c195ae1a2c5ce0 |
|
30-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
core: simplify unit type detection logic
Introduce a new call unit_type_supported() and make use of it
everywhere.
Also, drop Manager parameter from per-type supported method prototype. |
f78f265f405a61387c6c12a879ac0d6b6dc958db |
|
24-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
core: always coldplug units that are triggered by other units before those
Let's make sure that we don't enqueue triggering jobs for units before
those units are actually fully loaded.
http://lists.freedesktop.org/archives/systemd-devel/2015-April/031176.html
https://bugs.freedesktop.org/show_bug.cgi?id=88401 |
be847e82cf95bf8eb589778df2aa2b3d1d7ae99e |
|
24-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
Revert "core: do not spawn jobs or touch other units during coldplugging"
This reverts commit 6e392c9c45643d106673c6643ac8bf4e65da13c1.
We really shouldn't invent external state keeping hashmaps, if we can
keep this state in the units themselves. |
4940c0b0b621c0d5a4a3c1f3bc281ecba6151c58 |
|
21-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
service: make kill operation mapping explicit |
6e392c9c45643d106673c6643ac8bf4e65da13c1 |
|
07-Mar-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
core: do not spawn jobs or touch other units during coldplugging
Because the order of coldplugging is not defined, we can reference a
not-yet-coldplugged unit and read its state while it has not yet been
set to a meaningful value.
This way, already active units may get started again.
We fix this by deferring such actions until all units have been at
least somehow coldplugged.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=88401 |
5ad096b3f1331b175340129a8c9a5a9d711e5415 |
|
02-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
core: expose consumed CPU time per unit
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. |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use. |
c1ff5570f4a04bb9aedea444c12dce81679224ec |
|
12-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
Add missing includes in header files
This fixes various issues found by globally reordering the include
sections of all .c files. |
a354329f724d6ce913d2ccffb2be8f3327a67faa |
|
06-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
core: add new logic for services to store file descriptors in PID 1
With this change it is possible to send file descriptors to PID 1, via
sd_pid_notify_with_fds() which PID 1 will store individually for each
service, and pass via the usual fd passing logic on next invocation.
This is useful for enable daemon reload schemes where daemons serialize
their state to /run, push their fds into PID 1 and terminate, restoring
their state on next start from the data in /run and passed in from PID
1.
The fds are kept by PID 1 as long as no POLLHUP or POLLERR is seen on
them, and the service they belong to are either not dead or failed, or
have a job queued. |
0faacd470dfbd24f4c6504da6f04213aa05f9d19 |
|
15-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
unit: handle nicely of certain unit types are not supported on specific systems
Containers do not really support .device, .automount or .swap units;
Systems compiled without support for swap do not support .swap units;
Systems without kdbus do not support .busname units.
With this change attempts to start a unsupported unit types will result
in an immediate "unsupported" job result, which is a lot more
descriptive then before. Also, attempts to start device units in
containers will now immediately fail instead of causing jobs to be
enqueued that never go away. |
ee33e53a70c0d3f9d8aeafe4b8fd84a0d5e1d8d9 |
|
11-Dec-2014 |
Torstein Husebø <torstein@huseboe.net> |
core: correct spacing near eol in code comments |
d2dc52dbc45051faa6356213a537081084e9dda4 |
|
02-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: show unit file preset state in "systemctl status" output" |
b2dc4e44c540a30c5ea12a9a570425ceb310c320 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
core: add log_unit_*_errno() macros |
e2cc6eca73cd1df8be552d7c23f9ff3d69c06f1e |
|
28-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
log: fix order of log_unit_struct() to match other logging calls
Also, while we are at it, introduce some syntactic sugar for creating
ERRNO= and MESSAGE= structured logging fields. |
79008bddf679a5e0900369950eb346c9fa687107 |
|
27-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
log: rearrange log function naming
- Rename log_meta() → log_internal(), to follow naming scheme of most
other log functions that are usually invoked through macros, but never
directly.
- Rename log_info_object() to log_object_info(), simply because the
object should be before any other parameters, to follow OO-style
programming style. |
086891e5c119abb9854237fc32e736fe2d67234c |
|
27-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers
This change has two benefits:
- The format string %m will now resolve to the specified error (or to
errno if the specified error is 0. This allows getting rid of a ton of
strerror() invocations, a function that is not thread-safe.
- The specified error can be passed to the journal in the ERRNO= field.
Now of course, we just need somebody to convert all cases of this:
log_error("Something happened: %s", strerror(-r));
into thus:
log_error_errno(-r, "Something happened: %m"); |
134e56dcc53970a20a858283650bb92cd5da1d17 |
|
06-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
shared: rename condition-util.[ch] to condition.[ch]
Now that we only have one file with condition implementations around, we
can drop the -util suffix and simplify things a bit. |
493657337ad8569e0998a3afa7d6fb357757364a |
|
06-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
core: get rid of condition.c and move the remaining call into util.c
That way only one file with condition code remaining, in src/shared/,
rather than src/core/.
Next step: dropping the "-util" suffix from condition-util.[ch]. |
59fccdc587bc179c1638916ee16a24099f94f81f |
|
06-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
core: introduce the concept of AssertXYZ= similar to ConditionXYZ=, but fatal for a start job if not met |
db2cb23b5b179707000d28a11efb3d888d06ee80 |
|
28-Oct-2014 |
Umut Tezduyar Lindskog <umut.tezduyar@axis.com> |
core: send sigabrt on watchdog timeout to get the stacktrace
if sigabrt doesn't do the job, follow regular shutdown
routine, sigterm > sigkill. |
f189ab18de69d3dee81117d7925fb370cd038f0f |
|
28-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
job: optionally, when a job timeout is hit, also execute a failure action |
7c52a17b1a31eedd40093a4fbb460cf492087d9b |
|
25-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Rearrange Unit to make pahole happy
After all we have lots of those. |
cb87a73b45503eaa6bead291423a529b00d27156 |
|
08-Oct-2014 |
Lukas Nykryn <lnykryn@redhat.com> |
unit: move UnitDependency to unit-name |
598459cebac7cc93089769a992e7b03287f77e12 |
|
19-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
core: rework context initialization/destruction logic
Let's automatically initialize the kill, exec and cgroup contexts of the
various unit types when the object is constructed, instead of
invididually in type-specific code.
Also, when PrivateDevices= is set, set DevicePolicy= to closed. |
085afe36cb823e7d5b8c5f3ef21ebb9639bac78b |
|
24-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
core: add global settings for enabling CPUAccounting=, MemoryAccounting=, BlockIOAccounting= for all units at once |
bc432dc7eb62c5671f2b741a86a66393adb350dc |
|
17-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
core: rework cgroup mask propagation
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. |
a911bb9ab27ac0eb3bbf4e8b4109e5da9b88eee3 |
|
07-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
core: watch SIGCHLD more closely to track processes of units with no reliable cgroup empty notifier
When a process dies that we can associate with a specific unit, start
watching all other processes of that unit, so that we can associate
those processes with the unit too.
Also, for service units start doing this as soon as we get the first
SIGCHLD for either control or main process, so that we can follow the
processes of the service from one to the other, as long as process that
remain are processes of the ones we watched that died and got reassigned
to us as parent.
Similar, for scope units start doing this as soon as the scope
controller abandons the unit, and thus management entirely reverts to
systemd. To abandon a unit introduce a new Abandon() scope unit method
call. |
68db7a3bd9b2f8640c7297382b6d20eb995f7e1e |
|
27-Jan-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
core: add function to tell when job will time out
Things will continue when either the job timeout
or the unit timeout is reached. Add functionality to
access that info. |
aec8de63b14a93b91b85dc15bf879604352fbbe1 |
|
22-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
core: no need to list properties for PropertiesChanged messages anymore
Since the vtable includes this information anyway, let's just use that |
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0 |
|
02-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: add .busname unit type to implement kdbus-style bus activation |
613b411c947635136637f8cdd66b94512f761eab |
|
27-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
service: add the ability for units to join other unit's PrivateNetwork= and PrivateTmp= namespaces |
d420282b28f50720e233ccb1c02547c562195653 |
|
26-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
core: replace OnFailureIsolate= setting by a more generic OnFailureJobMode= setting and make use of it where applicable |
eeaedb7c26375352c32ec290cd716f2ff2dbe61a |
|
25-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
core: include following set data in dump |
6414b7c981378a6eef480f6806d7cbfc98ca22a1 |
|
22-Nov-2013 |
David Strauss <david@davidstrauss.net> |
cgroups: Cache controller masks and optimize queues. |
718db96199eb307751264e4163555662c9a389fa |
|
20-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
core: convert PID 1 to libsystemd-bus
This patch converts PID 1 to libsystemd-bus and thus drops the
dependency on libdbus. The only remaining code using libdbus is a test
case that validates our bus marshalling against libdbus' marshalling,
and this dependency can be turned off.
This patch also adds a couple of things to libsystem-bus, that are
necessary to make the port work:
- Synthesizing of "Disconnected" messages when bus connections are
severed.
- Support for attaching multiple vtables for the same interface on the
same path.
This patch also fixes the SetDefaultTarget() and GetDefaultTarget() bus
calls which used an inappropriate signature.
As a side effect we will now generate PropertiesChanged messages which
carry property contents, rather than just invalidation information. |
9588bc32096fc8342bfd8b989689717186d7d86e |
|
08-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
Remove dead code and unexport some calls
"make check-api-unused" informs us about code that is not used anymore
or that is exported but only used internally. Fix these all over the
place. |
44b601bc79e46722bc0f0862ee0ce34a2284ef11 |
|
16-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
macro: clean up usage of gcc attributes
Always use our own macros, and name all our own macros the same style. |
a57f7e2c828b852eb32fd810dcea041bb2975501 |
|
26-Sep-2013 |
Lennart Poettering <lennart@poettering.net> |
core: rework how we match mount units against each other
Previously to automatically create dependencies between mount units we
matched every mount unit agains all others resulting in O(n^2)
complexity. On setups with large amounts of mount units this might make
things slow.
This change replaces the matching code to use a hashtable that is keyed
by a path prefix, and points to a set of units that require that path to
be around. When a new mount unit is installed it is hence sufficient to
simply look up this set of units via its own file system paths to know
which units to order after itself.
This patch also changes all unit types to only create automatic mount
dependencies via the RequiresMountsFor= logic, and this is exposed to
the outside to make things more transparent.
With this change we still have some O(n) complexities in place when
handling mounts, but that's currently unavoidable due to kernel APIs,
and still substantially better than O(n^2) as before.
https://bugs.freedesktop.org/show_bug.cgi?id=69740 |
b9ec9359369f224bfb13db616f97401a6a177bd8 |
|
11-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
core: simplify drop-in writing logic a bit
let's make use of some format string magic! |
6c12b52e19640747e96f89d85422941a23dc6b29 |
|
01-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
core: add new "scope" unit type for making a unit of pre-existing processes
"Scope" units are very much like service units, however with the
difference that they are created from pre-existing processes, rather
than processes that systemd itself forks off. This means they are
generated programmatically via the bus API as transient units rather
than from static configuration read from disk. Also, they do not provide
execution-time parameters, as at the time systemd adds the processes to
the scope unit they already exist and the parameters cannot be applied
anymore.
The primary benefit of this new unit type is to create arbitrary cgroups
for worker-processes forked off an existing service.
This commit also adds a a new mode to "systemd-run" to run the specified
processes in a scope rather then a transient service. |
c2756a68401102786be343712c0c35acbd73d28d |
|
28-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
core: add transient units
Transient units can be created via the bus API. They are configured via
the method call parameters rather than on-disk files. They are subject
to normal GC. Transient units currently may only be created for
services (however, we will extend this), and currently only ExecStart=
and the cgroup parameters can be configured (also to be extended).
Transient units require a unique name, that previously had no
configuration file on disk.
A tool systemd-run is added that makes use of this functionality to run
arbitrary command lines as transient services:
$ systemd-run /bin/ping www.heise.de
Will cause systemd to create a new transient service and run ping in it. |
b42defe3b8ed3947d85db654a6cdb1b9999f394d |
|
27-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
dbus: make more cgroup attributes runtime settable |
8e2af478402414f060bbc16e1b4bbe7de1779c13 |
|
27-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
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. |
4ad490007b70e6ac18d3cb04fa2ed92eba1451fa |
|
27-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
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=). |
9444b1f20e311f073864d81e913bd4f32fe95cfd |
|
20-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
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. |
a016b9228f338cb9b380ce7e00826ef462767d98 |
|
17-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
core: add new .slice unit type for partitioning systems
In order to prepare for the kernel cgroup rework, let's introduce a new
unit type to systemd, the "slice". Slices can be arranged in a tree and
are useful to partition resources freely and hierarchally by the user.
Each service unit can now be assigned to one of these slices, and later
on login users and machines may too.
Slices translate pretty directly to the cgroup hierarchy, and the
various objects can be assigned to any of the slices in the tree. |
44a6b1b68029833893f6e9cee35aa27a974038f6 |
|
03-May-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add __attribute__((const, pure, format)) in various places
I'm assuming that it's fine if a _const_ or _pure_ function
calls assert. It is assumed that the assert won't trigger,
and even if it does, it can only trigger on the first call
with a given set of parameters, and we don't care if the
compiler moves the order of calls. |
b1e2b33c5258f1cefcee55116ac5d049478c804d |
|
26-Apr-2013 |
Cristian RodrÃguez <crrodriguez@opensuse.org> |
Add some extra __attribute__ ((format)) s |
31afa0a44c2d7f93d837c840cdbd623982ac165f |
|
26-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
unit: rework stop pending logic
When a trigger unit wants to know if a stop is queued for it, we should
just check precisely that and do not check whether it is actually
stopped already. This is because we use these checks usually from state
change calls where the state variables are not updated yet.
This change splits unit_pending_inactive() into two calls
unit_inactive_or_pending() and unit_stop_pending(). The former checks
state and pending jobs, the latter only pending jobs. |
78edb35ab4f4227485cb9ec816b43c37e0d5e62a |
|
25-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
cgroup: always validate cgroup controller names
Let's better be safe than sorry. |
3ecaa09bccd8a59c9f1e06756a1334a162206dc4 |
|
23-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
unit: rework trigger dependency logic
Instead of having explicit type-specific callbacks that inform the
triggering unit when a triggered unit changes state, make this generic
so that state changes are forwarded betwee any triggered and triggering
unit.
Also, get rid of UnitRef references from automount, timer, path units,
to the units they trigger and rely exclsuively on UNIT_TRIGGER type
dendencies. |
e8e581bf256b8c0fbd430935af79fa0e8ee570a1 |
|
17-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Report about syntax errors with metadata
The information about the unit for which files are being parsed
is passed all the way down. This way messages land in the journal
with proper UNIT=... or USER_UNIT=... attribution.
'systemctl status' and 'journalctl -u' not displaying those messages
has been a source of confusion for users, since the journal entry for
a misspelt setting was often logged quite a bit earlier than the
failure to start a unit.
Based-on-a-patch-by: Oleksii Shevchuk <alxchk@gmail.com> |
ae7a7182da31371555fceb2aed609e40a64b900a |
|
02-Apr-2013 |
Oleksii Shevchuk <alxchk@gmail.com> |
Introspect and monitor dropin configuration |
814cc562121270e2d5de0630b773792c74990a9c |
|
13-Mar-2013 |
Michal Schmidt <mschmidt@redhat.com> |
core: single unit_kill implementation for all unit types
There are very few differences in the implementations of the kill method in the
unit types that have one. Let's unify them.
This does not yet unify unit_kill() with unit_kill_context(). |
49b1d377263f33991a03235779e50f61273ba649 |
|
28-Feb-2013 |
Michal Schmidt <mschmidt@redhat.com> |
core:Â redefine unit_status_printf()
Take advantage of the fact that almost all callers want to pass unit
description as the last parameter. Those who don't can use the more
flexible manager_status_printf(). |
25cee55076a7c00c0a584731c2705686cc843210 |
|
28-Feb-2013 |
Michal Schmidt <mschmidt@redhat.com> |
core: add manager_status_printf()
unit_status_printf() checks the state of the manager, not of the unit
as such. Move it to manager.c and rename it to manager_status_printf().
Temporarily keep unit_status_printf as a wrapper macro. |
26d04f86a36595e3565c74d67863e076c3e3c773 |
|
27-Feb-2013 |
Lennart Poettering <lennart@poettering.net> |
unit: rework resource management API
This introduces a new static list of known attributes and their special
semantics. This means that cgroup attribute values can now be
automatically translated from user to kernel notation for command line
set settings, too.
This also adds proper support for multi-line attributes. |
cd2086fe6573df923dc53ef33998c9fff8c2bda5 |
|
26-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
core: unify kill code of mount, service, socket, swap units |
71645acac27da55d510f2e4d61cc61b4e5b93035 |
|
19-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
unit: optionally allow making cgroup attribute changes persistent |
bbc9006e6b5665073149331d75c104a33224dc19 |
|
18-Jan-2013 |
Mirco Tischler <mt-ml@gmx.de> |
core: log USER_UNIT instead of UNIT if in user session |
246aa6dd9dcea84bb945d16ec86e69f869dbb9b4 |
|
14-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
core: add bus API and systemctl commands for altering cgroup parameters during runtime |
fdf9f9bbe4dc3281bc8799e2a1f8709776c8cad8 |
|
06-Jan-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: new logging macros to include UNIT=
Adding UNIT= to log lines allows them to be shown
in 'systemctl status' output, etc.
A new set of macros and functions is added. This allows for less
verbose notation than using log_struct() explicitly.
The set of logging functions is expanded to take a pair of arguments
(e.g. "UNIT=" and the RHS) which add an extra line to the structured
log entry. This can be used to add macros which add a different
identifier later on. |
01e10de3c2b9c2944bd86b12fab83d1164d0b64a |
|
22-Dec-2012 |
Lennart Poettering <lennart@poettering.net> |
socket: support socket activation of containers |
8742514c1a1a5bc0f423da9101deb66115e187ff |
|
25-Nov-2012 |
Lennart Poettering <lennart@poettering.net> |
timer: recalculate next elapse for calendar timer units when the system clock is changed |
36697dc0199e25f09b78090fcf5f1cf8a3648ffd |
|
23-Nov-2012 |
Lennart Poettering <lennart@poettering.net> |
timer: implement calendar time events |
3ef63c317481c2b3f1fe39e1b0f130aac3544522 |
|
18-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
unit-printf: before resolving exec context specifiers check whether the object actually has an exec context |
41f9172f427bdbb8221c64029f78364b8dd4e527 |
|
18-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
unit: split unit_printf() and friends into its own .c file |
c53158818d8cdaf46b3f1b5299b9bda118a1043f |
|
13-Sep-2012 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
man: fix a bunch of typos in docs
https://bugs.freedesktop.org/show_bug.cgi?id=54501 |
85e9a1010d16064ce435b84f02dc585bc645aade |
|
26-Jul-2012 |
Michal Sekletar <msekleta@redhat.com> |
systemd: added new dependency PartOf
This should address TODO item "new dependency type to "group" services
in a target". Semantic of new dependency is as follows. Once configured
it creates dependency which will cause that all dependent units get
stopped if unit they all depend on is stopped or restarted. Usual use
case would be configuring PartOf=some.target in template unit file
and WantedBy=some.target in [Install] section and enabling desired
number of instances. In this case starting one instance won't pull in
target but stopping or starting target(in case of WantedBy is properly
configured) will cause stop/start of all instances. |
cba6e0627d659a33df31aaa74d0d701c4bc9f317 |
|
20-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
units: apply default resource limits to socket/mount/swap processes too |
c74f17d96cccd4cc998fd037cb92046930188c91 |
|
20-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
core: drop KillMode parameter from KillUnit() bus call
It made no sense, and since we are documenting the bus calls now and
want to include them in our stability promise we really should get it
cleaned up sooner, not later. |
c2f1db8f83618e60dcded8303d14656d7d26b436 |
|
19-Jul-2012 |
Shawn Landden <shawnlandden@gmail.com> |
use #pragma once instead of foo*foo #define guards
#pragma once has been "un-deprecated" in gcc since 3.3, and is widely supported
in other compilers.
I've been using and maintaining (rebasing) this patch for a while now, as
it annoyed me to see #ifndef fooblahfoo, etc all over the place,
almost arrogant about the annoyance of having to define all these names to
perform a commen but neccicary functionality, when a completely superior
alternative exists.
I havn't sent it till now, cause its kindof a style change, and it is bad
voodoo to mess with style that has been established by more established
editors. So feel free to lambast me as a crazy bafoon.
v2 - preserve externally used headers |
6b78f9b4354010f8af2fe48c783ffd52b2db8f57 |
|
18-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
unit: don't serialize job state, only unit state across switch-root |
e06c73cc91e02a1a3dffdb0976fef754f1109e74 |
|
16-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
unit: set default working directory to the user's home directory when running in user mode |
49f43d5f91a99b23f745726aa351d8f159774357 |
|
16-Jul-2012 |
Ville Skyttä <ville.skytta@iki.fi> |
Spelling fixes. |
d0bfe5243aa6fd9ccdd33fe3c9dfa0a08026d1ab |
|
15-Jul-2012 |
Kay Sievers <kay@vrfy.org> |
unit: avoid re-definition of enum for older gcc versions
<koen> | ./src/shared/unit-name.h:29:23: error: redefinition of typedef 'UnitType'
<koen> | ./src/core/unit.h:30:23: note: previous declaration of 'UnitType' was here |
7f2cddae09fd2579ae24434df577bb5e5a157d86 |
|
13-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
unit: rename BindTo= to BindsTo=
all other dependencies are in 3rd person. Change BindTo= accordingly to
BindsTo=.
Of course, the dependency is widely used, hence we parse the old name
too for compatibility. |
f69614f811b133ececad4394e88f9549a017bd4e |
|
10-Jul-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
unit: Move UnitLoadState definitions from core/unit.c to shared/unit-name.c
This makes it possible to use them from systemctl without linking
against the core. |
bcbe497e5a73d889e8799f8a3680c303afede347 |
|
10-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
unit: get rid of UnitVTable.suffix, which is now unused |
5f73969991fa765f2826975c0fc5e47438b5e9ea |
|
10-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
unit-name: remove unit_name_is_valid_no_type() and move unit_name_is_valid() to unit-name.h |
0a9f8ed00c8f323d5bf24a9a11149a9342c0e1aa |
|
10-Jul-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
unit: Move UnitType definitions from core/unit.c to shared/unit-name.c
This makes it possible to use them from systemctl without linking
against the core. A string->enum lookup table is added. |
1b64d026af01277e332d10d9e67e2eed5a4ded28 |
|
22-May-2012 |
Lennart Poettering <lennart@poettering.net> |
units: remove service sysv_path variable and replace it by generic unit_path
UnitPath= is also writable via native units and may be used by generators
to clarify from which file a unit is generated. This patch also hooks up
the cryptsetup and fstab generators to set UnitPath= accordingly. |
49dbfa7b2b0bf3906704dac1eaeb4eba91056a19 |
|
21-May-2012 |
Lennart Poettering <lennart@poettering.net> |
units: introduce new Documentation= field and make use of it everywhere
This should help making the boot process a bit easier to explore and
understand for the administrator. The simple idea is that "systemctl
status" now shows a link to documentation alongside the other status and
decriptionary information of a service.
This patch adds the necessary fields to all our shipped units if we have
proper documentation for them. |
c69182961b00707d977957cf81d5c41cfbeab429 |
|
14-May-2012 |
Michal Schmidt <mschmidt@redhat.com> |
unit: unit type dependent status messages
Instead of generic "Starting..." and "Started" messages for all unit use
type-dependent messages. For example, mounts will announce "Mounting..."
and "Mounted".
Add status messages to units of types that used to be entirely silent
(automounts, sockets, targets, devices). For unit types whose jobs are
instantaneous, report only the job completion, not the starting event.
Socket units with non-instantaneous jobs are rare (Exec*= is not used
often in socket units), so I chose not to print the starting messages
for them either.
This will hopefully give people better understanding of the boot. |
7c8fa05c4d5d01748ff2a04edb882afb3119b7d7 |
|
30-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
unit: add new dependency type RequiresMountsFor=
RequiresMountsFor= is a shortcut for adding requires and after
dependencies to all mount units neeed for the specified paths.
This solves a couple of issues regarding dep loop cycles for encrypted
swap. |
e0209d83e7b30153f43b1a633c955f66eb2c2e4a |
|
25-Apr-2012 |
Michal Schmidt <mschmidt@redhat.com> |
core: add NOP jobs, job type collapsing
Two of our current job types are special:
JOB_TRY_RESTART, JOB_RELOAD_OR_START.
They differ from other job types by being sensitive to the unit active state.
They perform some action when the unit is active and some other action
otherwise. This raises a question: when exactly should the unit state be
checked to make the decision?
Currently the unit state is checked when the job becomes runnable. It's more
sensible to check the state immediately when the job is added by the user.
When the user types "systemctl try-restart foo.service", he really intends
to restart the service if it's running right now. If it isn't running right
now, the restart is pointless.
Consider the example (from Bugzilla[1]):
sleep.service takes some time to start.
hello.service has After=sleep.service.
Both services get started. Two jobs will appear:
hello.service/start waiting
sleep.service/start running
Then someone runs "systemctl try-restart hello.service".
Currently the try-restart operation will block and wait for
sleep.service/start to complete.
The correct result is to complete the try-restart operation immediately
with success, because hello.service is not running. The two original
jobs must not be disturbed by this.
To fix this we introduce two new concepts:
- a new job type: JOB_NOP
A JOB_NOP job does not do anything to the unit. It does not pull in any
dependencies. It is always immediately runnable. When installed to a unit,
it sits in a special slot (u->nop_job) where it never conflicts with
the installed job (u->job) of a different type. It never merges with jobs
of other types, but it can merge into an already installed JOB_NOP job.
- "collapsing" of job types
When a job of one of the two special types is added, the state of the unit
is checked immediately and the job type changes:
JOB_TRY_RESTART -> JOB_RESTART or JOB_NOP
JOB_RELOAD_OR_START -> JOB_RELOAD or JOB_START
Should a job type JOB_RELOAD_OR_START appear later during job merging, it
collapses immediately afterwards.
Collapsing actually makes some things simpler, because there are now fewer
job types that are allowed in the transaction.
[1] Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=753586 |
39a18c60d07319ebfcfd476556729c2cadd616d6 |
|
24-Apr-2012 |
Michal Schmidt <mschmidt@redhat.com> |
job: serialize jobs properly
Jobs were not preserved correctly over a daemon-reload operation.
A systemctl process waiting for a job completion received a job removal
signal. The job itself changed its id. The job timeout started ticking all
over again.
This fixes the deficiencies. |
5430f7f2bc7330f3088b894166bf3524a067e3d8 |
|
12-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
relicense to LGPLv2.1 (with exceptions)
We finally got the OK from all contributors with non-trivial commits to
relicense systemd from GPL2+ to LGPL2.1+.
Some udev bits continue to be GPL2+ for now, but we are looking into
relicensing them too, to allow free copy/paste of all code within
systemd.
The bits that used to be MIT continue to be MIT.
The big benefit of the relicensing is that closed source code may now
link against libsystemd-login.so and friends. |
b30e2f4c18ad81b04e4314fd191a5d458553773c |
|
11-Apr-2012 |
Kay Sievers <kay@vrfy.org> |
move libsystemd_core.la sources into core/ |