summaryrefslogtreecommitdiff
path: root/src/manager.c
AgeCommit message (Collapse)Author
2012-01-18manager: don't place units in the 'cpu' group when run as user instance, for nowLennart Poettering
2012-01-16unit: use safe downcasts, remove pointless castsMichal Schmidt
Always use the macros for downcasting. Remove a few obviously pointless casts.
2012-01-16unit: remove union UnitMichal Schmidt
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.
2012-01-16unit: reduce heap usage for unit objectsMichal Schmidt
The storage of the unit objects on the heap is currently not very efficient. For every unit object we allocate a chunk of memory as large as the biggest unit type, although there are significant differences in the units' real requirements. pahole shows the following sizes of structs: 488 Target 496 Snapshot 512 Device 528 Path 560 Timer 576 Automount 1080 Socket 1160 Swap 1168 Service 1280 Mount Usually there aren't many targets or snapshots in the system, but Device is one of the most common unit types and for every one we waste 1280 - 512 = 768 bytes. Fix it by allocating only the right amount for the given unit type. On my machine (x86_64, with 39 LVM volumes) this decreases systemd's USS (unique set size) by more than 300 KB.
2012-01-12core: switch all log targets to go directly to the journal, instead via syslogLennart Poettering
2012-01-11systemd: reconnect to syslog as soon as the journal is fully upLennart Poettering
2012-01-11unit: implement new PropagateReloadTo=/PropagateReloadFrom= operationsLennart Poettering
2012-01-05build-sys: move public header files into a dir of their ownLennart Poettering
2011-12-31Merge branch 'journal'Lennart Poettering
2011-12-20dbus: register to DBus asynchronouslyMichal Schmidt
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-11-08Merge branch 'master' into journalLennart Poettering
2011-10-17audit: do not complain if kernel lacks auditJonathan Nieder
When running on a kernel without audit support, systemd currently writes a mysterious-sounding error to its log: systemd[1]: Failed to connect to audit log: Protocol not supported Better to suppress the audit_open() failure message when (and only when) it is due to running on a kernel without audit support, since in this case the admin probably does not mind systemd not writing to the audit log. This way, more serious errors like ENOMEM and EACCES will stand out more.
2011-10-17manager: fix a crash in isolatingMichal Schmidt
HASHMAP_FOREACH is safe against the removal of the current entry, but not against the removal of other entries. job_finish_and_invalidate() can recursively remove other entries. It triggered an assertion failure: Assertion 'j->installed' failed at src/manager.c:1218, function transaction_apply(). Aborting. Fix the crash by iterating from the beginning when there is a possibility that the iterator could be invalid. It is O(n^2) in the worst case, but that's better than a crash. https://bugzilla.redhat.com/show_bug.cgi?id=717325
2011-10-07journal: add preliminary incomplete implementationLennart Poettering
2011-09-23virt: add missing header inclusionLennart Poettering
2011-09-23util: improve signal_to_string, signal_from_stringMichal Schmidt
signal_to_string: Produce names for SIGRTMIN+n. Never give an "n/a" result. In the worst case give the number itself as a string. signal_from_string: Parse "RTMIN+n". Parse any valid signal number.
2011-09-23manager: fix job mode for SIGRTMIN+1, +2Michal Schmidt
The test did not work as intended and always resulted in JOB_REPLACE.
2011-09-01fsck: show progress while fscking at bootLennart Poettering
2011-08-21cgroup: honour sticky bit when trimming cgroup treesLennart Poettering
2011-08-01umask: set umask of a number of sockets by default, even though we check ↵Lennart Poettering
creds on connections
2011-08-01manager: call generators with umask 0022Lennart Poettering
2011-08-01util: use join() instead of asprintf() as an optimizationLennart Poettering
2011-07-23manager: add log control via RT signalsLennart Poettering
2011-07-22path-lookup: make inclusion of user private units optionalLennart Poettering
2011-07-06manager: merge serialization and desrialization counter into one, and ↵Lennart Poettering
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-05add a few O_CLOEXEC where missingLennart Poettering
2011-07-02manager: consider the active job when mergingMichal Schmidt
In some cases systemd forgets to start enabled services, e.g. in this scenario: 1. The job "sendmail.service/start" is installed. 2. Before systemd proceeds with this job, a process requests a reload of sendmail. The job "sendmail.service/reload" is enqueued. 3. The original job is silently discarded. The service is not started. The reload job proceeds by doing nothing. The fix is to allow merging transaction jobs with the active job. With the fix the resulting merged job "sendmail.service/reload-or-start" is installed and the service works as expected. https://bugzilla.redhat.com/show_bug.cgi?id=633774
2011-06-30manager: use sd_notify() to notify parent systemd that we have finished startupLennart Poettering
2011-06-27dbus: send our finished signal when we are finished bootingLennart Poettering
2011-06-21dbus: make bus_flags_to_events() and friends generally usefulLennart Poettering
2011-06-20manager: include full systemctl status command line in error messageLennart Poettering
2011-04-28dbus: make daemon reexecution synchronousLennart Poettering
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
2011-04-27manager: fix serialization counterLennart Poettering
2011-04-20cgroup: don't accidentaly trim on reloadLennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=678555
2011-04-19manager: when running in test mode, do not write generated unit files to ↵Lennart Poettering
/run/systemd/generator
2011-04-16manager: drop all pending jobs when isolatingLennart Poettering
2011-04-16manager: introduce IgnoreOnIsolate flag so that we can keep systemd-logger ↵Lennart Poettering
around when isolating
2011-04-16manager: downgrade a few log messagesLennart Poettering
2011-04-07manager: no need to use randomized generator dir when running as system managerLennart Poettering
2011-04-07don't make up buffer sizes, use standard LINE_MAX insteadLennart Poettering
2011-04-07manager: serialize/deserialize max job id and /usr taint flagLennart Poettering
2011-04-07manager: don't garbage collect jobs when isolating, to change global stateLennart Poettering
2011-04-06job: fix deserialization of jobs: do not ignore orderingLennart Poettering
2011-04-06manager: don't show PID for incoming signals if it is 0Lennart Poettering
2011-04-04manager: fd must be int, not charMichal Schmidt
This should fix the crash reported by Dan Horak on s390x which does not have VTs.
2011-03-31src: our lord is coverityLennart Poettering
2011-03-30analyze: beautify output a bitLennart Poettering
2011-03-30manager: fix taint check for /usrLennart Poettering
2011-03-28use /run instead of /dev/.runKay Sievers
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
2011-03-18syslog: rework syslog detection so that we need no compile-time option what ↵Lennart Poettering
the name of the syslog implementation is