summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* shared/install: use "→" instead of "pointing to" for a symlinkZbigniew Jędrzejewski-Szmek2016-05-091-1/+5
| | | | | | | | | | It's quite a bit shorter and just as readable. (The full sentence with "pointing to" was added to replace a text that used "ln -s %s %s". Using the "ln" syntax is indeed unclear, because it's not obvious which is the source and which is the target, and because symlink(2) uses the opposite order to ln(1). But with the unicode arrow there should be no ambiguity.)
* shared/install: do not print warning when a unit is already enabledZbigniew Jędrzejewski-Szmek2016-05-091-4/+6
| | | | | | | | Executing 'systemctl enable' on the same unit twice would cause a warning about a missing [Install] section to be printed. To avoid this, count all symlinks that "would" be created, and return 1 no matter if we actually created a symlink or skipped creation because it already exists.
* shared/install: handle dangling aliases as an explicit case, report nicelyZbigniew Jędrzejewski-Szmek2016-05-092-1/+16
| | | | | | | | | This fixes 'preset-all' with a unit that is a dangling symlink. $ systemctl --root=/ preset-all Unit syslog.service is an alias to a unit that is not present, ignoring. Unit auditd.service is masked, ignoring. Unit NetworkManager.service is masked, ignoring.
* shared/install: add some more debug messages and commentsZbigniew Jędrzejewski-Szmek2016-05-091-3/+20
| | | | | | | | | | | | $ systemctl --root=/ preset foobar.service Cannot find unit foobar.service. Failed to preset: No such file or directory. $ systemctl --root=/ preset foobar@.service Cannot find unit foobar@.service. Failed to preset: No such file or directory. $ systemctl --root=/ preset foobar@blah.service Cannot find unit foobar@blah.service or foobar@.service. Failed to preset: No such file or directory.
* shared/install: simplify error handling conditionals in a few placesZbigniew Jędrzejewski-Szmek2016-05-071-18/+10
|
* core/mount: add helper function for mount statesZbigniew Jędrzejewski-Szmek2016-05-071-21/+16
|
* Merge pull request #3205 from poettering/iaidZbigniew Jędrzejewski-Szmek2016-05-072-16/+16
|\ | | | | more dhcp fixes
| * man: link the part about [DHCP] to the DHCP= explanationLennart Poettering2016-05-061-0/+3
| |
| * man: move IPv6 note to the right sectionLennart Poettering2016-05-061-9/+5
| | | | | | | | Make the XML validate again.
| * networkd: move the IAID configuration option into the [DHCP] sectionLennart Poettering2016-05-062-7/+8
| | | | | | | | It's only relevant to DHCP, and it should be where the DUID is configured too.
* | Merge pull request #3160 from htejun/cgroup-fixes-rev2Zbigniew Jędrzejewski-Szmek2016-05-073-7/+11
|\ \ | | | | | | Cgroup fixes.
| * | core: fix segfault on "systemctl --set-property UNIT BlockIODeviceWeight=WEIGHT"Tejun Heo2016-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | bus_append_unit_property_assignment() was missing an argument for sd_bus_message_append() when processing BlockIODeviceWeight leading to segfault. Fix it. Signed-off-by: Tejun Heo <htejun@fb.com>
| * | core: make unit_has_mask_realized() consider controller enable stateTejun Heo2016-04-302-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unit_has_mask_realized() determines whether the specified unit has its cgroups set up properly given the desired target_mask; however, on the unified hierarchy, controllers need to be enabled explicitly for children and the mask of enabled controllers can deviate from target_mask. Only considering target_mask in unit_has_mask_realized() can lead to false positives and skipping enabling the requested controllers. This patch adds unit->cgroup_enabled_mask to track which controllers are enabled and updates unit_has_mask_realized() to also consider enable_mask. Signed-off-by: Tejun Heo <htejun@fb.com>
| * | core: bus_append_unit_property_assignment() was using the wrong parse functionTejun Heo2016-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | It was incorrectly using cg_cpu_weight_parse() to parse BlockIOWeight. Update it to use cg_blkio_weight_parse() instead. Signed-off-by: Tejun Heo <htejun@fb.com>
* | | Merge pull request #3215 from keszybz/news-and-other-small-cleanupsLennart Poettering2016-05-072-12/+12
|\ \ \ | | | | | | | | News and other small cleanups
| * | | NEWS: machinectl and loginctl also support --valueZbigniew Jędrzejewski-Szmek2016-05-071-7/+8
| | | |
| * | | systemctl: do not print header if no units will be listedZbigniew Jędrzejewski-Szmek2016-05-071-1/+1
| | | | | | | | | | | | | | | | "0 units listed." is still printed.
| * | | systemctl: rewrite code to explicitly take care of n_units==0 caseZbigniew Jędrzejewski-Szmek2016-05-071-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | Coverity was complaing, but it was a false positive (CID #1354669). Nevertheless, it's better to rewrite the code so that units is never null.
* | | | Merge pull request #3191 from poettering/cgroups-agent-dgramEvgeny Vereshchagin2016-05-0726-161/+302
|\ \ \ \ | |/ / / |/| | | core: use an AF_UNIX/SOCK_DGRAM socket for cgroup agent notification
| * | | journald: stack allocation cannot failLennart Poettering2016-05-051-10/+8
| | | | | | | | | | | | | | | | No need to check whether alloca() failed...
| * | | tree-wide: introduce new SOCKADDR_UN_LEN() macro, and use it everywhereLennart Poettering2016-05-0523-75/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macro determines the right length of a AF_UNIX "struct sockaddr_un" to pass to connect() or bind(). It automatically figures out if the socket refers to an abstract namespace socket, or a socket in the file system, and properly handles the full length of the path field. This macro is not only safer, but also simpler to use, than the usual offsetof() + strlen() logic.
| * | | core: use an AF_UNIX/SOCK_DGRAM socket for cgroup agent notificationLennart Poettering2016-05-056-78/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dbus-daemon currently uses a backlog of 30 on its D-bus system bus socket. On overloaded systems this means that only 30 connections may be queued without dbus-daemon processing them before further connection attempts fail. Our cgroups-agent binary so far used D-Bus for its messaging, and hitting this limit hence may result in us losing cgroup empty messages. This patch adds a seperate cgroup agent socket of type AF_UNIX/SOCK_DGRAM. Since sockets of these types need no connection set up, no listen() backlog applies. Our cgroup-agent binary will hence simply block as long as it can't enqueue its datagram message, so that we won't lose cgroup empty messages as likely anymore. This also rearranges the ordering of the processing of SIGCHLD signals, service notification messages (sd_notify()...) and the two types of cgroup notifications (inotify for the unified hierarchy support, and agent for the classic hierarchy support). We now always process events for these in the following order: 1. service notification messages (SD_EVENT_PRIORITY_NORMAL-7) 2. SIGCHLD signals (SD_EVENT_PRIORITY_NORMAL-6) 3. cgroup inotify and cgroup agent (SD_EVENT_PRIORITY_NORMAL-5) This is because when receiving SIGCHLD we invalidate PID information, which we need to process the service notification messages which are bound to PIDs. Hence the order between the first two items. And we want to process SIGCHLD metadata to detect whether a service is gone, before using cgroup notifications, to decide when a service is gone, since the former carries more useful metadata. Related to this: https://bugs.freedesktop.org/show_bug.cgi?id=95264 https://github.com/systemd/systemd/issues/1961
* | | | Merge pull request #3210 from evverx/expose-usecEvgeny Vereshchagin2016-05-072-1/+7
|\ \ \ \ | | | | | | | | | | core: expose TriggerLimitIntervalUSec, dump TriggerLimitIntervalSec and TriggerLimitBurst too
| * | | | core: dump TriggerLimitIntervalSec and TriggerLimitBurst tooEvgeny Vereshchagin2016-05-061-0/+6
| | | | |
| * | | | core: expose TriggerLimitIntervalUSecEvgeny Vereshchagin2016-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: $ systemctl show --property TriggerLimitIntervalSec test.socket TriggerLimitIntervalSec=2000000 After: $ systemctl show --property TriggerLimitIntervalUSec test.socket TriggerLimitIntervalUSec=2s
* | | | | Merge pull request #3212 from dmedri/masterLennart Poettering2016-05-072-63/+79
|\ \ \ \ \ | | | | | | | | | | | | Minor fixes and .po updates
| * | | | | NEWS: minor fixesDaniele Medri2016-05-071-2/+2
| | | | | |
| * | | | | italian: .po updatesDaniele Medri2016-05-071-61/+77
|/ / / / /
* | | | | tests: add test for #3171 (#3206)Evgeny Vereshchagin2016-05-063-0/+109
|/ / / /
* | | | core: update the right mtime after finishing writing of transient units (#3203)Lennart Poettering2016-05-061-1/+1
| |_|/ |/| | | | | Fixes: #3194
* | | systemctl: indentation fixLennart Poettering2016-05-061-14/+15
| | |
* | | NEWS: bring NEWS a bit up-to-dateLennart Poettering2016-05-062-46/+127
| | |
* | | Merge pull request #3201 from ssahani/net-wordLennart Poettering2016-05-062-39/+40
|\ \ \ | | | | | | | | networkd lib: cleanup FOREACH_WORD
| * | | networkd: route fix commentSusant Sahani2016-05-061-1/+1
| | | |
| * | | networkd: cleanup FOREACH_WORDSusant Sahani2016-05-061-38/+39
| |/ /
* | | Merge pull request #3190 from poettering/logind-fixesZbigniew Jędrzejewski-Szmek2016-05-0511-6/+85
|\ \ \
| * | | logind: drop pointless UINT64_C() macro useLennart Poettering2016-05-051-3/+3
| | | |
| * | | logind: enforce a limit on inhibitors we hand outLennart Poettering2016-05-056-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For similar reasons as the recent addition of a limit on sessions. Note that we don't enforce a limit on inhibitors per-user currently, but there's an implicit one, since each inhibitor takes up one fd, and fds are limited via RLIMIT_NOFILE, and the limit on the number of processes per user.
| * | | logind: expose more configuration settings as bus propertiesLennart Poettering2016-05-051-0/+3
| | | |
| * | | logind: don't include session lists in PropertyChanged messagesLennart Poettering2016-05-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a lot of simultaneous sessions we really shouldn't send the full list of active sessions with each PropertyChanged message for user and seat objects, as that can become quite substantial data, we probably shouldn't dump on the bus on each login and logout. Note that the global list of sessions doesn't send out changes like this either, it only supports requesting the session list with ListSessions(). If cients want to get notified about sessions coming and going they should subscribe to SessionNew and SessionRemoved signals, and clients generally do that already. This is kind of an API break, but then again the fact that this was included was never documented.
| * | | logind: process session/inhibitor fds at higher priorityLennart Poettering2016-05-053-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's make sure we process session and inhibitor pipe fds (that signal sessions/inhibtors going away) at a higher priority than new bus calls that might create new sessions or inhibitors. This helps ensuring that the number of open sessions stays minimal.
| * | | update TODOLennart Poettering2016-05-051-0/+4
| | | |
| * | | logind: enforce a limit on current user sessionsLennart Poettering2016-05-056-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We really should put limits on all resources we manage, hence add one to the number of concurrent sessions, too. This was previously unbounded, hence set a relatively high limit of 8K by default. Note that most PAM setups will actually invoke pam_systemd prefixed with "-", so that the return code of pam_systemd is ignored, and the login attempt succeeds anyway. On systems like this the session will be created but is not tracked by systemd.
* | | | Merge pull request #3198 from poettering/trigger-timeout-defaultsEvgeny Vereshchagin2016-05-063-11/+35
|\ \ \ \ | | | | | | | | | | change trigger timeout defaults
| * | | | update TODOLennart Poettering2016-05-051-0/+2
| | | | |
| * | | | core: fix owner user/group output in socket dumpLennart Poettering2016-05-051-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unit file settings are called SocketUser= and SocketGroup= hence name these fields that way in the "systemd-analyze dump" output too. https://github.com/systemd/systemd/issues/3171#issuecomment-216216995
| * | | | core: change default trigger limits for socket unitsLennart Poettering2016-05-052-7/+28
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Let's lower the default values a bit, and pick different defaults for Accept=yes and Accept=no sockets. Fixes: #3167
* | | | Merge pull request #3197 from phomes/networkd-memleakZbigniew Jędrzejewski-Szmek2016-05-052-2/+4
|\ \ \ \ | |/ / / |/| | | Fixes for memleaks in networkd and test
| * | | test-networkd-conf: fix memleakThomas Hindoe Paaboel Andersen2016-05-051-1/+3
| | | |
| * | | networkd: fix memleak in config_parse_duid_rawdataThomas Hindoe Paaboel Andersen2016-05-051-1/+1
|/ / /