summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-04-29core: Filter by unit name behind the D-Bus, instead on the client side (#3142)kayrus
This commit improves systemd performance on the systems which have thousands of units.
2016-04-29Merge pull request #3126 from poettering/small-fixesZbigniew Jędrzejewski-Szmek
fsync directory when creating or rotating journal files and other small fixes, most importantly for the DHCP DUID code.
2016-04-29rules: add NVMe rules (#3136)Ming Lin
Add NVMe rules using the "wwid" attribute. root@target:~# cat /sys/block/nvme0n1/wwid eui.3825004235000591 root@target:~# ls /dev/disk/by-id/ -l |grep nvme lrwxrwxrwx 1 root root 13 Apr 27 16:08 nvme-eui.3825004235000591 -> ../../nvme0n1 lrwxrwxrwx 1 root root 15 Apr 27 16:08 nvme-eui.3825004235000591-part1 -> ../../nvme0n1p1 lrwxrwxrwx 1 root root 15 Apr 27 16:08 nvme-eui.3825004235000591-part2 -> ../../nvme0n1p2
2016-04-29Merge pull request #3069 from Werkov/fix-dependencies-for-bind-mountsLennart Poettering
Always create dependencies for bind mounts
2016-04-29journal-file: when rotating a journal file, fsync directory tooLennart Poettering
As suggested by: https://github.com/systemd/systemd/pull/3126#discussion_r61125474
2016-04-29networkd: clean up DUID code a bitLennart Poettering
Let's move DUID configuration into the [DHCP] section, since it only makes sense in a DHCP context, and should be close to the configuration of ClientIdentifier= and suchlike. This really shouldn't be a section of its own, we don't have any for any of our other per-protocol specific identifiers... Follow-up for #2890 #2943
2016-04-29journal: when creating a new journal file, fsync() the directory it is ↵Lennart Poettering
created in too Fixes: #2831
2016-04-29update TODO a bitLennart Poettering
2016-04-29man: minor wording fixesLennart Poettering
As suggested in: https://github.com/systemd/systemd/pull/3124#discussion_r61068789
2016-04-29vimrc: fix indentation logic for our docbook xml filesLennart Poettering
Make sure TAB results in 2ch indenting as we commonly use for our docbook XML files.
2016-04-29parse-util: fix conversion from size_t on s390 (#3147)Lubomir Rintel
On s390 size_t is an unsigned long, nor an unsigned int. They both are of the same size and can be cast to each other safely, but the compiler still seems unhappy about incompatible pointers. Fixes: 7c2da2ca8
2016-04-29Merge pull request #3137 from keszybz/dirent-simplificationLennart Poettering
Various small cleanups in shared code
2016-04-29nspawn: convert uuid to string (#3146)Evgeny Vereshchagin
Fixes: cp /etc/machine-id /var/tmp/systemd-test.HccKPa/nspawn-root/etc systemd-nspawn -D /var/tmp/systemd-test.HccKPa/nspawn-root --link-journal host -b ... Host and machine ids are equal (P�S!V): refusing to link journals
2016-04-28networkd: reconfigure IPv6 and static address after link up event (#3105)Susant Sahani
Now we are not setting static address, start dhcp6 client and discovering IPv6 routers after link gained carrier. This fixes #2912.
2016-04-28basic/mount-util: recognize pvfs2 as network fs (#3140)Zbigniew Jędrzejewski-Szmek
Added to kernel 4.6.
2016-04-28nspawn: initialize the veth_name (#3141)Evgeny Vereshchagin
Fixes: $ systemd-nspawn -h ... Failed to remove veth interface ����: Operation not permitted This is a follow-up for d2773e59de3dd970d861
2016-04-28cgtop: initialize `ours' to NULL properly (#3139)Naohiro Aota
Running cgtop on a system, which lacks expecting stat file, results in a segfault. For example, a system with blkio tree but without cfq io scheduler, lacks "blkio.io_service_bytes". When the targeting cgroup's file does not exist, process() returns 0 and also does not modify `*ret' value (which is `*ours'). As a result, callers of refresh_one() can have bogus pointer, which result in SEGV. This patch just properly initialize the variable to NULL.
2016-04-28test: chmod +x sysv-generator-testZbigniew Jędrzejewski-Szmek
Just for convenience.
2016-04-28test-path-util: add a trivial test for hidden_or_backup_fileZbigniew Jędrzejewski-Szmek
2016-04-28tree-wide: rename hidden_file to hidden_or_backup_file and optimizeZbigniew Jędrzejewski-Szmek
In standard linux parlance, "hidden" usually means that the file name starts with ".", and nothing else. Rename the function to convey what the function does better to casual readers. Stop exposing hidden_file_allow_backup which is rather ugly and rewrite hidden_file to extract the suffix first. Note that hidden_file_allow_backup excluded files with "~" at the end, which is quite confusing. Let's get rid of it before it gets used in the wrong place.
2016-04-27Add croatian translation, hr.po and systemd.hr.catalog filesmuzena
2016-04-27basic/dirent-util: do not call hidden_file_allow_backup from ↵Zbigniew Jędrzejewski-Szmek
dirent_is_file_with_suffix If the file name is supposed to end in a suffix, there's not need to check the name against a list of "special" file names, which is slow. Instead, just check that the name doens't start with a period.
2016-04-27networkd: drop unnecessary stmtZbigniew Jędrzejewski-Szmek
2016-04-27machinectl: simplify option string assignmentZbigniew Jędrzejewski-Szmek
It's better to avoid having the option string duplicated, lest we forget to modify them in sync in the future.
2016-04-27Stop syslog.socket when entering emergency mode (#3130)Martin Pitt
When enabling ForwardToSyslog=yes, the syslog.socket is active when entering emergency mode. Any log message then triggers the start of rsyslog.service (or other implementation) along with its dependencies such as local-fs.target and sysinit.target. As these might fail themselves (e. g. faulty /etc/fstab), this breaks the emergency mode. This causes syslog.socket to fail with "Failed to queue service startup job: Transition is destructive". Add Conflicts=syslog.socket to emergency.service to make sure the socket is stopped when emergency.service is started. Fixes #266
2016-04-27Correctly parse OBJECT_PID in journald messages (#3129)Nalin Dahyabhai
The parse_pid() function doesn't succeed if we don't zero-terminate after the last digit in the buffer.
2016-04-27path-util: Add hidden suffixes for ucf (#3131)Martin Pitt
ucf is a standard Debian helper for managing configuration file upgrades which need more interaction or elaborate merging than conffiles managed by dpkg. Ignore its temporary and backup files similarly to the *.dpkg-* ones to avoid creating units for them in generators. https://bugs.debian.org/775903
2016-04-27journal: set STATE_ARCHIVED as part of offlining (#2740)Vito Caputo
The only code path which makes a journal durable is via journal_file_set_offline(). When we perform a rotate the journal's header->state is being set to STATE_ARCHIVED prior to journal_file_set_offline() being called. In journal_file_set_offline(), we short-circuit the entire offline when f->header->state != STATE_ONLINE. This all results in none of the journal_file_set_offline() fsync() calls being reached when rotate archives a journal, so archived journals are never explicitly made durable. What we do now is instead of setting the f->header->state to STATE_ARCHIVED directly in journal_file_rotate() prior to journal_file_close(), we set an archive flag in f->archive for the journal_file_set_offline() machinery to honor by committing STATE_ARCHIVED instead of STATE_OFFLINE when set. Prior to this, rotated journals were never getting fsync() explicitly performed on them, since journal_file_set_offline() short-circuited. Obviously this is undesirable, and depends entirely on the underlying filesystem as to how much durability was achieved when simply closing the file. Note that this problem existed prior to the recent asynchronous fsync changes, but those changes do facilitate our performing this durable offline on rotate without blocking, regardless of the underlying filesystem sync-on-close semantics.
2016-04-26core: set start job timeout from the kernel commandline (#3112)tblume
Add the boot parameter: systemd.default_timeout_start_sec to allow modification of the default start job timeout at boot time.
2016-04-26Merge pull request #3124 from poettering/small-journal-fixesZbigniew Jędrzejewski-Szmek
2016-04-26Revert "smaller journal fixes (#3124)"Zbigniew Jędrzejewski-Szmek
This reverts commit 6e3930c40f3379b7123e505a71ba4cd6db6c372f. Merge got squashed by mistake.
2016-04-26Merge pull request #3093 from poettering/nspawn-userns-magicLennart Poettering
nspawn automatic user namespaces
2016-04-26smaller journal fixes (#3124)Lennart Poettering
* sd-journal: detect earlier if we try to read an object from an invalid offset Specifically, detect early if we try to read from offset 0, i.e. are using uninitialized offset data. * journal: when dumping journal contents, react nicer to lines we can't read If journal files are not cleanly closed it might happen that intermediaery journal entries cannot be read. Handle this nicely, skip over the unreadable entries, and log a debug message about it; after all we generally follow the logic that we try to make the best of corrupted files. * journal-file: always generate the same error when encountering corrupted files Let's make sure EBADMSG is the one error we throw when we encounter corrupted data, so that we can neatly test for it. * journal-file: when iterating through a partly corruped journal file, treat error like EOF When we linearly iterate through a corrupted journal file, and we encounter a read error, don't consider this fatal, but merely as EOF condition (and log about it). * journal-file: make seeking in corrupted files work Previously, when we used a bisection table for seeking through a corrupted file, and the end of the bisection table was corrupted we'd most likely fail the entire seek operation. Improve the situation: if we encounter invalid entries in a bisection table, linearly go backwards until we find a working entry again. * man: elaborate on the automatic systemd-journald.socket service dependencies Fixes: #1603
2016-04-26tests: document requirements of networkd integration tests (#3125)Martin Pitt
Document the necessary dependencies and nspawn/lxd options to run test/networkd-test.py.
2016-04-26man: elaborate on the automatic systemd-journald.socket service dependenciesLennart Poettering
Fixes: #1603
2016-04-26journal-file: make seeking in corrupted files workLennart Poettering
Previously, when we used a bisection table for seeking through a corrupted file, and the end of the bisection table was corrupted we'd most likely fail the entire seek operation. Improve the situation: if we encounter invalid entries in a bisection table, linearly go backwards until we find a working entry again.
2016-04-26journal-file: when iterating through a partly corruped journal file, treat ↵Lennart Poettering
error like EOF When we linearly iterate through a corrupted journal file, and we encounter a read error, don't consider this fatal, but merely as EOF condition (and log about it).
2016-04-26journal-file: always generate the same error when encountering corrupted filesLennart Poettering
Let's make sure EBADMSG is the one error we throw when we encounter corrupted data, so that we can neatly test for it.
2016-04-26journal: when dumping journal contents, react nicer to lines we can't readLennart Poettering
If journal files are not cleanly closed it might happen that intermediaery journal entries cannot be read. Handle this nicely, skip over the unreadable entries, and log a debug message about it; after all we generally follow the logic that we try to make the best of corrupted files.
2016-04-26sd-journal: detect earlier if we try to read an object from an invalid offsetLennart Poettering
Specifically, detect early if we try to read from offset 0, i.e. are using uninitialized offset data.
2016-04-26systemd --user: call pam_loginuid when creating user@.service (#3120)Zbigniew Jędrzejewski-Szmek
This way the user service will have a loginuid, and it will be inherited by child services. This shouldn't change anything as far as systemd itself is concerned, but is nice for various services spawned from by systemd --user that expect a loginuid. pam_loginuid(8) says that it should be enabled for "..., crond and atd". user@.service should behave similarly to those two as far as audit is concerned. https://bugzilla.redhat.com/show_bug.cgi?id=1328947#c28
2016-04-25Merge pull request #3109 from poettering/journal-by-fdZbigniew Jędrzejewski-Szmek
rework "journalctl -M"
2016-04-25Merge pull request #3114 from poettering/journalctl-bZbigniew Jędrzejewski-Szmek
Fix endless loops in journalctl --list-boots (closes #617).
2016-04-25Hp Folio 1040g2 micmute and toggle touchpad fn keys fix (#3118)EMOziko
Added HP Folio 1040g2 Fn+F8 MICMUTE FIx
2016-04-25machined: add CAP_MKNOD to capabilities to run with (#3116)Lennart Poettering
Container images from Debian or suchlike contain device nodes in /dev. Let's make sure we can clone them properly, hence pass CAP_MKNOD to machined. Fixes: #2867 #465
2016-04-25machined: generate a nicer error when the user tries "machinectl clone" on ↵Lennart Poettering
non-btrfs file systems (#3117) Fixes: #2060 (Of course, in the long run, we should probably add a copy-based fall-back. But given how slow that is, this probably requires some asynchronous forking logic like the CopyFrom() and CopyTo() method calls already implement.)
2016-04-25core: fix description of "resources" service error (#3119)Lennart Poettering
The "resources" error is really just the generic error we return when we hit some kind of error and we have no more appropriate error for the case to return, for example because of some OS error. Hence, reword the explanation and don't claim any relation to resource limits. Admittedly, the "resources" service error is a bit of a misnomer, but I figure it's kind of API now. Fixes: #2716
2016-04-25Merge pull request #3113 from ssahani/route-fixLennart Poettering
netwotkd: fix address and route conf
2016-04-25journal: fix already offline check and thread leak (#2810)Vito Caputo
Early in journal_file_set_offline() f->header->state is tested to see if it's != STATE_ONLINE, and since there's no need to do anything if the journal isn't online, the function simply returned here. Since moving part of the offlining process to a separate thread, there are two problems here: 1. We can't simply check f->header->state, because if there is an offline thread active it may modify f->header->state. 2. Even if the journal is deemed offline, the thread responsible may still need joining, so a bare return may leak the thread's resources like its stack. To address #1, the helper journal_file_is_offlining() is called prior to accessing f->header->state. If journal_file_is_offlining() returns true, f->header->state isn't even checked, because an offlining journal is obviously online, and we'll just continue with the normal set offline code path. If journal_file_is_offlining() returns false, then it's safe to check f->header->state, because the offline_state is beyond the point of modifying f->header->state, and there's a memory barrier in the helper. If we find f->header->state is != STATE_ONLINE, then we call the idempotent journal_file_set_offline_thread_join() on the way out of the function, to join a potential lingering offline thread.
2016-04-25journalctl: turn --unit= in combination with --user into --user-unit=Lennart Poettering
Let's be nice to users, and let's turn the nonsensical "--unit=… --user" into "--user-unit=…" which the user more likely meant. Fixes #1621