summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | 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
|/ / /
* | | Trivial network cleanup (#3196)Thomas H. P. Andersen2016-05-052-2/+1
|/ / | | | | | | | | | | * gitignore: typo fix for test-networkd-conf * networkd: fix double include
* | Merge pull request #3156 from keszybz/duid-settingsLennart Poettering2016-05-0446-435/+671
|\ \ | | | | | | Rework DUID setting
| * | network: get rid of DUID_TYPE_RAWZbigniew Jędrzejewski-Szmek2016-05-032-2/+0
| | | | | | | | | | | | It wasn't used for anything after the recent changes.
| * | man: add a description of DUIDType and DUIDRawDataZbigniew Jędrzejewski-Szmek2016-05-032-34/+80
| | | | | | | | | | | | | | | | | | | | | | | | This is essentially a revert of f38e0cce75ff2ffbd99f7e382ed39c160bb7d799 (which removed the documentation of DUIDType on purpose). The description is heavily updated for the new semantics. This addresses #3127 § 4.
| * | man: s/similar/similarly/Zbigniew Jędrzejewski-Szmek2016-05-031-5/+5
| | |
| * | test-networkd-conf: add tests for the parsing functionsZbigniew Jędrzejewski-Szmek2016-05-033-0/+97
| | |
| * | networkd: rework duid_{type,duid_type,duid,duid_len} settingZbigniew Jędrzejewski-Szmek2016-05-0311-144/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separate fields are replaced with a struct. Second second duid type field is removed. The first field was used to carry the result of DUIDType= configuration, and the second was either a copy of this, or contained the type extracted from DuidRawData. The semantics are changed so that the type specified in DUIDType is always used. DUIDRawData= no longer overrides the type setting. The networkd code is now more constrained than the sd-dhcp code: DUIDRawData cannot have 0 length, length 0 is treated the same as unsetting. Likewise, it is not possible to set a DUIDType=0. If it ever becomes necessary to set type=0 or a zero-length duid, the code can be changed to support that. Nevertheless, I think that's unlikely. This addresses #3127 § 1 and 3. v2: - rename DUID.duid, DUID.duid_len to DUID.raw_data, DUID.raw_data_len
| * | dh-dhcp{,6}-client: change the semantics of DUID settingZbigniew Jędrzejewski-Szmek2016-05-033-18/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both versions of the code are changed to allow the caller to override DUID using simple rules: duid type and value may be specified, in which case the caller is responsible to providing the contents, or just duid type may be specified as DUID_TYPE_EN, in which case we we fill in the values. In the future more support for other types may be added, e.g. DUID_TYPE_LLT. There still remains and ugly discrepancy between dhcp4 and dhcp6 code: dhcp6 has sd_dhcp6_client_set_duid and sd_dhcp6_client_set_iaid and requires client->state to be DHCP6_STATE_STOPPED, while dhcp4 has sd_dhcp_client_set_iaid_duid and will reconfigure the client if it is not stopped. This commit doesn't touch that part. This addresses #3127 § 2.
| * | dhcp-identifier: un-inline dhcp_validate_duid_lenZbigniew Jędrzejewski-Szmek2016-05-032-35/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After all it is used in more than one place and is not that short. Also tweak the test a bit: - do not check that duid_len > 0, because we want to allow unknown duid types, and there might be some which are fine with 0 length data, (also assert should not be called from library code), - always check that duid_len <= MAX_DUID_LEN, because we could overwrite available buffer space otherwise.
| * | sd-dhcp: change uint8_t *duid to const void*Zbigniew Jędrzejewski-Szmek2016-05-034-4/+5
| | |
| * | sd-dhcp{,6}-client: use standard indentation for functions argsZbigniew Jędrzejewski-Szmek2016-05-034-105/+214
| | |
| * | networkd: rework headers to avoid circular includesZbigniew Jędrzejewski-Szmek2016-04-2929-99/+114
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Header files were organized in a way where the includer would add various typedefs used by the includee before including it, resulting in a tangled web of dependencies between files. Replace this with the following logic: networkd.h / \ networkd-link.h \ networkd-ipv4ll.h--\__\ networkd-fdb.h \ networkd-network.h netword-netdev-*.h networkd-route.h \ networkd-netdev.h If a pointer to a structure defined in a different header file is needed, use a typedef line instead of including the whole header.
* | treewide: fix typos (#3187)Torstein Husebø2016-05-045-6/+6
| |
* | Merge pull request #3170 from poettering/v230-preparation-fixesLennart Poettering2016-05-0422-106/+172
|\ \ | | | | | | make virtualization detection quieter, rework unit start limit logic, detect unit file drop-in changes correctly, fix autofs state propagation
| * | automount: move resetting of expiry timeout to automount_set_state()Lennart Poettering2016-05-021-8/+16
| | | | | | | | | | | | | | | that way we can be sure that there's no expiry timeout in place at any time when we aren't in the RUNNING state.
| * | automount: rework propagation between automount and mount unitsLennart Poettering2016-05-023-45/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port the progagation logic to the generic Unit->trigger_notify() callback logic in the unit vtable, that is called for a unit not only when the triggered unit of it changes state but also when a job for that unit finishes. This, firstly allows us to make the code a bit cleaner and more generic, but more importantly, allows us to notice correctly when a mount job fails, and propagate that back to autofs client processes. Fixes: #2181
| * | core: don't propagate service state to sockets as long as there's still a ↵Lennart Poettering2016-05-021-4/+13
| | | | | | | | | | | | job for the service queued
| * | fstab-generator: add newline before we start a new unit file sectionLennart Poettering2016-05-021-0/+1
| | | | | | | | | | | | We already did this for the [Mount] section, let's do the same for [Automount].
| * | automount: add debug message when we get notified about mount state changesLennart Poettering2016-05-021-2/+5
| | |
| * | core: remove duplicate code in automount_update_mount()Lennart Poettering2016-05-021-28/+11
| | | | | | | | | | | | Also, fix indentation.
| * | core: simplify unit_need_daemon_reload() a bitLennart Poettering2016-05-021-18/+10
| | | | | | | | | | | | | | | | | | | | | | | | And let's make it more accurate: if we have acquire the list of unit drop-ins, then let's do a full comparison against the old list we already have, and if things differ in any way, we know we have to reload. This makes sure we detect changes to drop-in directories in more cases.