summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2015-11-11core: simplify mount unit dependency generation a bitLennart Poettering
Let's make the code a bit more explicit. Should not change execution logic in any way.
2015-11-11core: simplify things a bit by checking default_dependencies boolean in ↵Lennart Poettering
callee, not caller It's nicer to hide the check away in the various xyz_add_default_dependencies() calls, rather than making it explicit in the caller, and thus require deeper nesing.
2015-11-11core: pull in dbus.socket from Type=dbus servicesLennart Poettering
Do so only on non-kdbus systems. And on non-kdbus systems don't bother with .busname units.
2015-11-11core: change default deps of services to require sysinit.target instead of ↵Lennart Poettering
basic.target With this change services by default will no longer require basic.target, but instead only after it it via After=basic.target. However, they will still Require= on sysinit.target. This has the benefit that when booting into emergency mode it is relatively safe to actviate individual services, as this will not pull the entirety of basic.target anymore, thus avoid everything listed in sockets.target and suchlike. However, during the usual boot no change should be noticed.
2015-11-11Merge pull request #1837 from poettering/grabbag2Tom Gundersen
variety of fixes
2015-11-10Remove snapshot unit typeZbigniew Jędrzejewski-Szmek
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
2015-11-10core: change type of distribute_fds() prototype to return voidLennart Poettering
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.
2015-11-10core: try to continue if coldplugging of a unit failsLennart Poettering
2015-11-10core: change return value of the unit's enumerate() call to voidLennart Poettering
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.
2015-11-10Merge pull request #1835 from poettering/grabbag-of-stuffDaniel Mack
Lots of small fixes
2015-11-10Merge pull request #1785 from ssahani/wordLennart Poettering
core: unit deps port to extract_first_word
2015-11-10Merge pull request #1783 from vcaputo/still_make_progress_when_throttlingLennart Poettering
core: still make progress when throttling the manager loop
2015-11-10core: unit deps port to extract_first_wordSusant Sahani
2015-11-10core: accept time units for time-based resource limitsLennart Poettering
Let's make sure "LimitCPU=30min" can be parsed properly, following the usual logic how we parse time values. Similar for LimitRTTIME=. While we are at it, extend a bit on the man page section about resource limits. Fixes: #1772
2015-11-10core: when parsing resource limits, be more careful with types and corner casesLennart Poettering
Let's not convert RLIM_INFINITY to "unsigned long long" and then back to rlim_t, but let's leave it in the right type right-away. Parse resource limits as 64 bit in all cases, as according to the man page that's what libc does anyway. Make sure setting a resource limit to (uint64_t) -1 results in a parsing error, and isn't implicitly converted to RLIM_INFINITY.
2015-11-10core: simplify parsing of capability bounding set settingsLennart Poettering
Let's generate a simple error, and that's it. Let's not try to be smart and record the last word that failed. Also, let's make sure we don't compare numeric values with 0 by relying on C's downgrade-to-bool feature, as suggested in CODING_STYLE.
2015-11-10defs: rework CONF_DIRS_NULSTR() macroLennart Poettering
The macro is generically useful for putting together search paths, hence let's make it truly generic, by dropping the implicit ".d" appending it does, and leave that to the caller. Also rename it from CONF_DIRS_NULSTR() to CONF_PATHS_NULSTR(), since it's not strictly about dirs that way, but any kind of file system path. Also, mark CONF_DIR_SPLIT_USR() as internal macro by renaming it to _CONF_PATHS_SPLIT_USR() so that the leading underscore indicates that it's internal.
2015-11-09Merge pull request #1820 from michich/errno-v2Daniel Mack
[v2] treewide: treatment of errno and other cleanups
2015-11-09Merge pull request #1799 from jengelh/docLennart Poettering
doc: typo and ortho fixes
2015-11-09Merge pull request #1807 from michich/boot-timerLennart Poettering
core/timer: in containers OnBootSec should count from container startup
2015-11-09Merge pull request #1794 from karelzak/size_limitLennart Poettering
core: support IEC suffixes for RLIMIT stuff
2015-11-07core/timer: in containers OnBootSec should count from container startupMichal Schmidt
In Fedora dnf-makecache.timer specifies OnBootSec=10min, but it fired during boot in systemd-nspawn, because the clock ticks since the host's boot. Fix it by treating OnBootSec the same as OnStartupSec when running in a container.
2015-11-07core: remove unused variableThomas Hindoe Paaboel Andersen
unused since 7b2313f5
2015-11-06doc: correct punctuation and improve typography in documentationJan Engelhardt
2015-11-06core: support IEC suffixes for RLIMIT stuffKarel Zak
Let's make things more user-friendly and support for example LimitAS=16G rather than force users to always use LimitAS=16106127360. The change is relevant for options: [Default]Limit{FSIZE,DATA,STACK,CORE,RSS,AS,MEMLOCK,MSGQUEUE} The patch introduces config_parse_bytes_limit(), it's the same as config_parse_limit() but uses parse_size() tu support the suffixes. Addresses: https://github.com/systemd/systemd/issues/1772
2015-11-05treewide: use the negative error codes returned by our functionsMichal Schmidt
Our functions return negative error codes. Do not rely on errno being set after calling our own functions.
2015-11-04core: still make progress when throttling the manager loopVito Caputo
Don't simply continue after sleeping, it potentially puts us in a state of spinning doing nothing slowly, if the ratelimit_test() keeps detecting the need for limiting. Observed in vms after the host had been suspended for a while, on resume systemd entered a loop of making zero progress spamming the console with: [431942.850090] systemd[1]: Looping too fast. Throttling execution a little. I see no reason to have a continue here, the intention should be to throttle execution, not circumvent it altogether.
2015-11-04Merge pull request #1761 from ssahani/wordLennart Poettering
core: parse socket port to extract_first_word
2015-11-04core: fix typoTorstein Husebø
2015-11-04core: small fixes to parse_namespaceEvgeny Vereshchagin
* don't hide ENOMEM * log r instead of 0
2015-11-03core: parse socket port to extract_first_wordSusant Sahani
2015-11-03Merge pull request #1744 from evverx/fix-debug-generatorLennart Poettering
debug-generator: respect kernel parameters for default unit setting
2015-11-03core: use runlevel_to_target for /proc/cmdline parsingEvgeny Vereshchagin
2015-11-03Merge pull request #1754 from martinpitt/masterDaniel Mack
core: drop check for /etc/mtab
2015-11-02core: expose number of file descriptors in fd store on the busLennart Poettering
For each service expose how many file descriptors there are currently in the fd store. (Also, fix the exporting of the fdstore limit, given that the field is just an "unsigned" but we exported it as "uint32_t". Not that there way any effective difference, but let's make this clean...)
2015-11-02core: bump net.unix.max_dgram_qlen really early during bootLennart Poettering
Only that way it actually has an effect on all our sockets, including $NOTIFY_SOCKET.
2015-11-02Merge pull request #1690 from evverx/run-runtime-directoryLennart Poettering
systemd-run can launch units with RuntimeDirectory
2015-11-02core: drop check for /etc/mtabMartin Pitt
util-linux 2.27.1 now entirely stops looking at /etc/mtab, so we don't need to verify /etc/mtab during early boot any more. Later on, tmpfiles.d/etc.conf will fix /etc/mtab anyway, so there's not even a point in warning about it. Drop test_mtab() and bump the util-linux dependency to >= 2.17.1. Fixes #1495
2015-11-02Merge pull request #1722 from evverx/port-cap-bounding-set-to-extract-first-wordDaniel Mack
Port capabiliy bounding set parsing to extract_first_word
2015-11-02core: be more verbose when NameOwnerChanged subscriptions failDaniel Mack
2015-11-02core: service: fix error messageDaniel Mack
The directive is called FileDescriptorStoreMax=, not FDStoreMax=.
2015-10-31sd-daemon: increase sd_notify() socket buffer sizeLennart Poettering
Let's make sure we don't start blocking on sd_notify() earlier than necessary, let's bump the socket buffer sizes to 8M. We already do something similar for our logging socket buffers, hence apply a similar bump here.
2015-10-31core: bail our earlier when doing auditLennart Poettering
Let's make sure we don't even try to create the audit socket
2015-10-31core,nspawn: minor coding style fixesLennart Poettering
2015-10-31core: constify a few thingsLennart Poettering
2015-10-31core: set_unit_path overwrites SYSTEMD_UNIT_PATHEvgeny Vereshchagin
2015-10-30core: port config_parse_bounding_set to extract_first_wordEvgeny Vereshchagin
2015-10-29core: fix capability bounding set parsingEvgeny Vereshchagin
bug: CapabilityBoundingSet= doesn't reset all caps
2015-10-28core: fix priority ordering in notify-handlingDavid Herrmann
Currently, we dispatch NOTIFY messages in a tight loop. Regardless how much data is incoming, we always dispatch everything that is queued. This, however, completely breaks priority event-handling of sd-event. When dispatching one NOTIFY event, another completely different event might fire, or might be queued by the NOTIFY handling. However, this event will not get dispatched until all other further NOTIFY messages are handled. Those might even arrive _after_ the other event fired, and as such completely break priority ordering of sd-event (which several code paths rely on). Break this by never dispatching multiple messages. Just return after each message that was read and let sd-event handle everything else. (The patch looks scarier that it is. It basically just drops the for(;;) loop and re-indents the loop-content.)
2015-10-27Merge pull request #1698 from poettering/pid-is-unwaited-fixTom Gundersen
fixup for previous pr