summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-06-30Merge pull request #3634 from disneyworldguy/v2sigchldLennart Poettering
manager: Only invoke a single sigchld per unit within a cleanup cycle
2016-06-30Fix #3236 (#3633)Lennart Poettering
* networkd: condition_test() can return a negative error, handle that If a condition check fails with an error we should not consider the check successful. Fix that. We should probably also improve logging in this case, but for now, let's just unbreak this breakage. Fixes: #3236 * condition: handle unrecognized architectures nicer When we encounter a check for an architecture we don't know we should not let the condition check fail with an error code, but instead simply return false. After all the architecture might just be newer than the ones we know, in which case it's certainly not our local one. Fixes: #3236
2016-06-30Merge pull request #3596 from poettering/machine-cleanMartin Pitt
make "machinectl clean" asynchronous, and open it up via PolicyKit
2016-06-30sd-event: expose the event loop iteration counter via ↵Lennart Poettering
sd_event_get_iteration() (#3631) This extends the existing event loop iteration counter to 64bit, and exposes it via a new function sd_event_get_iteration(). This is helpful for cases like issue #3612. After all, since we maintain the counter anyway, we might as well expose it. (This also fixes an unrelated issue in the man page for sd_event_wait() where micro and milliseconds got mixed up)
2016-06-30manager: Only invoke a single sigchld per unit within a cleanup cycleKyle Walker
By default, each iteration of manager_dispatch_sigchld() results in a unit level sigchld event being invoked. For scope units, this results in a scope_sigchld_event() which can seemingly stall for workloads that have a large number of PIDs within the scope. The stall exhibits itself as a SIG_0 being initiated for each u->pids entry as a result of pid_is_unwaited(). v2: This patch resolves this condition by only paying to cost of a sigchld in the underlying scope unit once per sigchld iteration. A new "sigchldgen" member resides within the Unit struct. The Manager is incremented via the sd event loop, accessed via sd_event_get_iteration, and the Unit member is set to the same value as the manager each time that a sigchld event is invoked. If the Manager iteration value and Unit member match, the sigchld event is not invoked for that iteration.
2016-06-30Merge pull request #3608 from teg/sd-device-driver-idLennart Poettering
sd-device: handle the 'drivers' pseudo-subsystem correctly
2016-06-30journalctl: Make temporary files directory configurable (#3574)ottopotto
journalctl: Use env variable TMPDIR to save temporary files
2016-06-30sd-event: expose the event loop iteration counter via sd_event_get_iteration()Lennart Poettering
This extends the existing event loop iteration counter to 64bit, and exposes it via a new function sd_event_get_iteration(). This is helpful for cases like issue #3612. After all, since we maintain the counter anyway, we might as well expose it. (This also fixes an unrelated issue in the man page for sd_event_wait() where micro and milliseconds got mixed up)
2016-06-29Merge pull request #3516 from fsateler/shared-basicLennart Poettering
build-sys: Convert libshared into a private shared library
2016-06-29Merge pull request #3622 from keszybz/journalctl-this-bootLennart Poettering
Make `journalctl --directory=... --boot 0` work
2016-06-29sd-bus: Fix a read after free error in bus-match. (#3624) (#3625)Weng Xuetian
The loop on bus_match_run should break and return immediately if bus->match_callbacks_modified is true. Otherwise the loop may access free'd data.
2016-06-28systemctl mask of an non-existent unit should print a warning (#3521)Susant Sahani
fixes https://bugzilla.redhat.com/show_bug.cgi?id=842060
2016-06-28journalct: allow --boot=0 to DTRT with --file/--directoryZbigniew Jędrzejewski-Szmek
--boot=0 magically meant "this boot", but when used with --file/--directory it should simply refer to the last boot found in the specified journal. This way, --boot and --list-boots are consistent. Fixes #3603.
2016-06-28journalctl: use simpler variable names in get_boots()Zbigniew Jędrzejewski-Szmek
Those are just local variables and ref_boot_offset is especially obnoxious.
2016-06-28journalct: do no allow --this-boot to take argumentsZbigniew Jędrzejewski-Szmek
Before --this-boot was deprecated in a331b5e6d47243, it did not take any arguments.
2016-06-28journalctl: allow --file/--directory with --boot or --list-bootsZbigniew Jędrzejewski-Szmek
It works mostly fine, and can be quite useful to examine data from another system. OTOH, a single boot id doesn't make sense with --merge, so mixing with --merge is still not allowed.
2016-06-28Remove blank line in the output of “systemctl show” (#3614)Lénaïc Huard
“systemctl show” added an extra blank line after the dump of the EnvironmentFile property of the unit.
2016-06-28resolved: add test for route-only domain filtering (#3609)Martin Pitt
With commit 6f7da49d00 route-only domains do not get put into resolv.conf's "search" list any more. Add a comment about the tri-state, to clarify its semantics and why we are passing a bool parameter into an int type. Also add a test case for it.
2016-06-27basic/strv: introduce STRV_IGNORE macro (#3601)0xAX
to hide casting of '-1' strings and make code cleaner.
2016-06-27basic: pass flags to the fnmatch (#3606)Evgeny Vereshchagin
Fixes: ``` $ systemctl list-unit-files 'hey\*' 0 unit files listed. $ systemctl list-unit-files | grep hey hey\x7eho.service static ```
2016-06-27sd-device: new_from_subsystem_sysnam - support a real subsystem called 'drivers'Tom Gundersen
We support writing out tags and db files in case a real subsystem called 'drivers' exists, so there is no reason to refuse parsing it.
2016-06-27sd-device: device_id - set correctly for 'drivers'Tom Gundersen
The 'drivers' pseudo-subsystem needs special treatment. These pseudo-devices are found under /sys/bus/drivers/, so needs the real subsystem encoded in the device_id in order to be resolved. The reader side already assumed this to be the case.
2016-06-26sd-device: enumerator - do not abort enumeration if a device failsTom Gundersen
Collect the errors and return to the caller, but continue enumerating all devices.
2016-06-26Merge pull request #3572 from poettering/machinectl-shell-fixMartin Pitt
machinectl: interpret options placed between "shell" verb and machine name
2016-06-26machinectl: verify image existance on "start" and "enable" (#3579)Lennart Poettering
Let's make sure we catch early when a machine doesn't exist that is attempted to be started or enabled as system service.
2016-06-26networkd: use strv_fnmatch() (#3605)0xAX
2016-06-26Merge pull request #3600 from poettering/fstab-generator-fixesMartin Pitt
Fstab generator fixes
2016-06-26basic/strv: use SWAP_TWO() macro (#3602)0xAX
2016-06-25nspawn: fix uid patching logic (#3599)Lennart Poettering
An incorrectly set if/else chain caused aus to apply the access mode of a symlink to the directory it is located in. Yuck. Fixes: #3547
2016-06-24build-sys: Add new libsystemd-shared private libraryFelipe Sateler
Link as many binaries as possible with it, to save storage space. Preserve the static libshared and libbasic for use in libraries, nss modules and udev. Libraries need to be static in order to avoid polluting the symbol namespace. Udev needs to be static so downstream can avoid strict version dependencies with the systemd package, and this can complicate upgrade scenarios.
2016-06-24fstab-generator: minor simplificationLennart Poettering
2016-06-24fstab-generator: skip fsck for /usr on non-device file systemsLennart Poettering
We do the same already for the root device, hence follow the scheme for /usr too. (Also add some explanatory comments.)
2016-06-24fstab-generator: don't skip /usr handling if root handling didn't work correctlyLennart Poettering
Let's follow the same logic for all mounts here: log errors, and exit the process uncleanly ultimately, but do not skip further mounts if we encounter a problem with an earlier one. Fixes: #2344
2016-06-24systemctl: fix an error condition from "-1" to something meaningfulLennart Poettering
We really shouldn't make up errors like "-1", but use proper errno definitions.
2016-06-24fstab-generator: fix checking of fstab_node_to_udev_node() resultLennart Poettering
We have to check for OOM here, let's add that. There's really no point in checking for path_is_absolute() on the result however, as there's no particular reason why that should be refused. Also, we don't have similar checks for the other mount devices the generator deals with, hence don't bother with it here either. Let's remove that check. (And it shouldn't return made-up errors like "-1" in this case anyway.)
2016-06-24fstab-generator: document why we copy the root device into the usr device if ↵Lennart Poettering
unset Let's a comment about this, to avoid questions popping up like in #2344.
2016-06-24fstab-generator: let's use path_equal() for comparing pathsLennart Poettering
2016-06-24pid1: restore console color support for containers (#3595)Franck Bui
Commit 3a18b60489504056f9b0b1a139439cbfa60a87e1 introduced a regression that disabled the color mode for container. This patch fixes this.
2016-06-24machined: make sure CleanPool() method is opened up in the dbus policyLennart Poettering
The method is already hooked up to PolicyKit, hence let's open this up via the bus policy language too. Fixes: #3585
2016-06-24machined: "machinectl clean" can take a while, do it asynchronously from a ↵Lennart Poettering
background process This is a follow-up to 5d2036b5f3506bd0ff07042aee8d69c26db32298, and also makes the "machinectl clean" verb asynchronous, after all it's little more than a series of image removals. The changes required to make this happen are a bit more comprehensive as we need to pass information about deleted images back to the client, as well as information about the image we failed on if we failed on one. Hence, create a temporary file in /tmp, serialize that data into, and read it from the parent after the operation is complete.
2016-06-24machined: don't bother explicitly closing the errno pipeLennart Poettering
There's no point in explicitly closing the errno pipe, if we exit right after anyway. It doesn't hurt doing this either, but let's do this the same way for all cases where we use the "Operation" object right now, and in all other cases we do not close the pipe explicitly, hence don't do so here either.
2016-06-24cgroup: minor coding style fixLennart Poettering
2016-06-24Merge pull request #3594 from poettering/resolved-servfailMartin Pitt
resolved fixes for handling SERVFAIL errors from servers
2016-06-24systemctl: Create new unit files with "edit --force" (#3584)Doug Christman
2016-06-24resolved: add option to disable caching (#3592)Martin Pitt
In some cases, caching DNS results locally is not desirable, a it makes DNS cache poisoning attacks a tad easier and also allows users on the system to determine whether or not a particular domain got visited by another user. Thus provide a new "Cache" resolved.conf option to disable it.
2016-06-24Merge pull request #3549 from poettering/resolved-moreTom Gundersen
resolved: more fixes, among them "systemctl-resolve --status" to see DNS configuration in effect, and a local DNS stub listener on 127.0.0.53
2016-06-23resolved: when processing auxiliary DNSSEC transactions, accept those with ↵Lennart Poettering
SERVFAIL Some upstream DNS servers return SERVFAIL if we ask them for DNSSEC RRs, which some forwarding DNS servers pass on to us as SERVFAIL (other though as NOERROR...). This is should not be considered a problem, as long as the domain in question didn't have DNSSEC enabled. Hence: when making use of auxiliary transactions accept those that return SERVFAIL.
2016-06-23resolved: when caching replies, check rcode earlierLennart Poettering
This way we don't log complaints about packets without SOA in case we are not caching it anyway because the rcode is not SUCCESS or NXDOMAIN...
2016-06-23resolved: rework SERVFAIL handlingLennart Poettering
There might be two reasons why we get a SERVFAIL response from our selected DNS server: because this DNS server itself is bad, or because the DNS server actually serving the zone upstream is bad. So far we immediately downgraded our server feature level when getting SERVFAIL, under the assumption that the first case is the only possible case. However, this meant we'd downgrade immediately even if we encountered the second case described above. With this commit handling of SERVFAIL is reworked. As soon as we get a SERVFAIL on a transaction we retry the transaction with a lower feature level, without changing the feature level tracked for the DNS server itself. If that fails too, we downgrade further, and so on. If during this downgrading the SERVFAIL goes away we assume that the DNS server we are talking to is bad, but the zone is fine and propagate the detected feature level to the information we track about the DNS server. Should the SERVFAIL not go away this way we let the transaction fail and accept the SERVFAIL.
2016-06-23fstab-generator: ignore root=/dev/nfs (#3591)Harald Hoyer
root=/dev/nfs is a legacy option for the kernel to handle root on NFS. Documentation for this kernel command line option can be found in the kernel source tree: Documentation/filesystems/nfs/nfsroot.txt