Zbigniew Jędrzejewski-Szmek [Sat, 7 May 2016 21:02:55 +0000 (17:02 -0400)]
shared/install: do not print warning when a unit is already enabled
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.
Zbigniew Jędrzejewski-Szmek [Wed, 4 May 2016 14:10:57 +0000 (10:10 -0400)]
shared/install: handle dangling aliases as an explicit case, report nicely
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.
Zbigniew Jędrzejewski-Szmek [Wed, 4 May 2016 14:09:52 +0000 (10:09 -0400)]
shared/install: add some more debug messages and comments
$ 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.
Zbigniew Jędrzejewski-Szmek [Wed, 4 May 2016 14:04:08 +0000 (10:04 -0400)]
shared/install: simplify error handling conditionals in a few places
Zbigniew Jędrzejewski-Szmek [Tue, 3 May 2016 19:57:36 +0000 (15:57 -0400)]
core/mount: add helper function for mount states
Zbigniew Jędrzejewski-Szmek [Sat, 7 May 2016 19:31:58 +0000 (15:31 -0400)]
Merge pull request #3205 from poettering/iaid
more dhcp fixes
Zbigniew Jędrzejewski-Szmek [Sat, 7 May 2016 19:08:57 +0000 (15:08 -0400)]
Merge pull request #3160 from htejun/cgroup-fixes-rev2
Cgroup fixes.
Lennart Poettering [Sat, 7 May 2016 16:40:57 +0000 (18:40 +0200)]
Merge pull request #3215 from keszybz/news-and-other-small-cleanups
News and other small cleanups
Evgeny Vereshchagin [Sat, 7 May 2016 16:17:44 +0000 (19:17 +0300)]
Merge pull request #3191 from poettering/cgroups-agent-dgram
core: use an AF_UNIX/SOCK_DGRAM socket for cgroup agent notification
Zbigniew Jędrzejewski-Szmek [Sat, 7 May 2016 15:43:39 +0000 (11:43 -0400)]
NEWS: machinectl and loginctl also support --value
Zbigniew Jędrzejewski-Szmek [Mon, 25 Apr 2016 01:54:52 +0000 (21:54 -0400)]
systemctl: do not print header if no units will be listed
"0 units listed." is still printed.
Zbigniew Jędrzejewski-Szmek [Mon, 25 Apr 2016 01:50:25 +0000 (21:50 -0400)]
systemctl: rewrite code to explicitly take care of n_units==0 case
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.
Evgeny Vereshchagin [Sat, 7 May 2016 14:21:29 +0000 (17:21 +0300)]
Merge pull request #3210 from evverx/expose-usec
core: expose TriggerLimitIntervalUSec, dump TriggerLimitIntervalSec and TriggerLimitBurst too
Lennart Poettering [Sat, 7 May 2016 09:01:36 +0000 (11:01 +0200)]
Merge pull request #3212 from dmedri/master
Minor fixes and .po updates
Daniele Medri [Sat, 7 May 2016 03:00:12 +0000 (05:00 +0200)]
NEWS: minor fixes
Daniele Medri [Sat, 7 May 2016 02:58:30 +0000 (04:58 +0200)]
italian: .po updates
Evgeny Vereshchagin [Fri, 6 May 2016 21:05:59 +0000 (00:05 +0300)]
tests: add test for #3171 (#3206)
Evgeny Vereshchagin [Fri, 6 May 2016 21:03:16 +0000 (21:03 +0000)]
core: dump TriggerLimitIntervalSec and TriggerLimitBurst too
Evgeny Vereshchagin [Fri, 6 May 2016 20:08:28 +0000 (20:08 +0000)]
core: expose TriggerLimitIntervalUSec
Before:
$ systemctl show --property TriggerLimitIntervalSec test.socket
TriggerLimitIntervalSec=2000000
After:
$ systemctl show --property TriggerLimitIntervalUSec test.socket
TriggerLimitIntervalUSec=2s
Lennart Poettering [Fri, 6 May 2016 16:22:22 +0000 (18:22 +0200)]
core: update the right mtime after finishing writing of transient units (#3203)
Fixes: #3194
Lennart Poettering [Fri, 6 May 2016 15:08:03 +0000 (17:08 +0200)]
man: link the part about [DHCP] to the DHCP= explanation
Lennart Poettering [Fri, 6 May 2016 15:07:41 +0000 (17:07 +0200)]
man: move IPv6 note to the right section
Make the XML validate again.
Lennart Poettering [Fri, 6 May 2016 15:04:05 +0000 (17:04 +0200)]
networkd: move the IAID configuration option into the [DHCP] section
It's only relevant to DHCP, and it should be where the DUID is configured too.
Lennart Poettering [Fri, 6 May 2016 14:58:01 +0000 (16:58 +0200)]
systemctl: indentation fix
Lennart Poettering [Fri, 6 May 2016 14:55:44 +0000 (16:55 +0200)]
NEWS: bring NEWS a bit up-to-date
Lennart Poettering [Fri, 6 May 2016 09:57:12 +0000 (11:57 +0200)]
Merge pull request #3201 from ssahani/net-word
networkd lib: cleanup FOREACH_WORD
Susant Sahani [Fri, 6 May 2016 04:19:49 +0000 (09:49 +0530)]
networkd: route fix comment
Susant Sahani [Fri, 6 May 2016 04:07:31 +0000 (09:37 +0530)]
networkd: cleanup FOREACH_WORD
Zbigniew Jędrzejewski-Szmek [Fri, 6 May 2016 00:28:23 +0000 (20:28 -0400)]
Merge pull request #3190 from poettering/logind-fixes
Evgeny Vereshchagin [Thu, 5 May 2016 23:11:11 +0000 (02:11 +0300)]
Merge pull request #3198 from poettering/trigger-timeout-defaults
change trigger timeout defaults
Lennart Poettering [Thu, 5 May 2016 20:49:25 +0000 (22:49 +0200)]
logind: drop pointless UINT64_C() macro use
Lennart Poettering [Wed, 4 May 2016 17:40:05 +0000 (19:40 +0200)]
logind: enforce a limit on inhibitors we hand out
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.
Lennart Poettering [Wed, 4 May 2016 17:22:30 +0000 (19:22 +0200)]
logind: expose more configuration settings as bus properties
Lennart Poettering [Wed, 4 May 2016 17:05:18 +0000 (19:05 +0200)]
logind: don't include session lists in PropertyChanged messages
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.
Lennart Poettering [Wed, 4 May 2016 17:01:56 +0000 (19:01 +0200)]
logind: process session/inhibitor fds at higher priority
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.
Lennart Poettering [Wed, 4 May 2016 17:01:46 +0000 (19:01 +0200)]
update TODO
Lennart Poettering [Wed, 4 May 2016 16:57:15 +0000 (18:57 +0200)]
logind: enforce a limit on current user sessions
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.
Lennart Poettering [Thu, 5 May 2016 18:51:52 +0000 (20:51 +0200)]
update TODO
Lennart Poettering [Thu, 5 May 2016 11:45:18 +0000 (13:45 +0200)]
core: fix owner user/group output in socket dump
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
Lennart Poettering [Thu, 5 May 2016 11:39:31 +0000 (13:39 +0200)]
core: change default trigger limits for socket units
Let's lower the default values a bit, and pick different defaults for
Accept=yes and Accept=no sockets.
Fixes: #3167
Lennart Poettering [Thu, 5 May 2016 20:26:09 +0000 (22:26 +0200)]
journald: stack allocation cannot fail
No need to check whether alloca() failed...
Lennart Poettering [Thu, 5 May 2016 20:24:36 +0000 (22:24 +0200)]
tree-wide: introduce new SOCKADDR_UN_LEN() macro, and use it everywhere
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.
Zbigniew Jędrzejewski-Szmek [Thu, 5 May 2016 12:08:16 +0000 (08:08 -0400)]
Merge pull request #3197 from phomes/networkd-memleak
Fixes for memleaks in networkd and test
Thomas Hindoe Paaboel Andersen [Thu, 5 May 2016 11:22:35 +0000 (13:22 +0200)]
test-networkd-conf: fix memleak
Thomas Hindoe Paaboel Andersen [Thu, 5 May 2016 11:17:09 +0000 (13:17 +0200)]
networkd: fix memleak in config_parse_duid_rawdata
Lennart Poettering [Wed, 4 May 2016 18:43:23 +0000 (20:43 +0200)]
core: use an AF_UNIX/SOCK_DGRAM socket for cgroup agent notification
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
Thomas H. P. Andersen [Thu, 5 May 2016 09:15:46 +0000 (11:15 +0200)]
Trivial network cleanup (#3196)
* gitignore: typo fix for test-networkd-conf
* networkd: fix double include
Tejun Heo [Wed, 4 May 2016 21:43:13 +0000 (17:43 -0400)]
core: fix segfault on "systemctl --set-property UNIT BlockIODeviceWeight=WEIGHT"
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>
Lennart Poettering [Wed, 4 May 2016 09:31:59 +0000 (11:31 +0200)]
Merge pull request #3156 from keszybz/duid-settings
Rework DUID setting
Torstein Husebø [Wed, 4 May 2016 09:26:17 +0000 (11:26 +0200)]
treewide: fix typos (#3187)
Lennart Poettering [Wed, 4 May 2016 08:46:13 +0000 (10:46 +0200)]
Merge pull request #3170 from poettering/v230-preparation-fixes
make virtualization detection quieter, rework unit start limit logic, detect unit file drop-in changes correctly, fix autofs state propagation
Franck Bui [Tue, 3 May 2016 23:29:11 +0000 (01:29 +0200)]
tmpfiles: don't set the x bit for volatile system journal when ACL support is enabled (#3079)
When ACL support is enabled, systemd-tmpfiles-setup service sets the following
ACL entries to the volatile system journal:
$ getfacl /run/log/journal/*/system.journal
getfacl: Removing leading '/' from absolute path names
# file: run/log/journal/xxx/system.journal
# owner: root
# group: systemd-journal
user::rwx
group::r--
group:wheel:r-x
group:adm:r-x
mask::r-x
other::---
This patch makes sure that the exec bit is not set anymore for the volatile
system journals.
Zbigniew Jędrzejewski-Szmek [Tue, 3 May 2016 23:22:22 +0000 (19:22 -0400)]
Merge pull request #3185 from NetworkManager/lr/unhappy-trie
Fix incorrect string deduplication in udev
Lubomir Rintel [Tue, 3 May 2016 20:15:49 +0000 (22:15 +0200)]
strbuf: set the proper character when creating new nodes
Commit
82501b3fc added an early break when a terminal node is found to
incorrect place -- before setting c. This caused trie to be built that
does not correspond to what it points to in buffer, causing incorrect
deduplications:
# cat /etc/udev/rules.d/99-bug.rules
ENV{FOO}=="0"
ENV{xx0}=="BAR"
ENV{BAZ}=="00"
# udevadm test
* RULE /etc/udev/rules.d/99-bug.rules:1, token: 0, count: 2, label: ''
M ENV match 'FOO' '0'(plain)
* RULE /etc/udev/rules.d/99-bug.rules:2, token: 2, count: 2, label: ''
M ENV match 'xx0' 'BAR'(plain)
* RULE /etc/udev/rules.d/99-bug.rules:3, token: 4, count: 2, label: ''
M ENV match 'BAZ' 'x0'(plain)
* END
The addition of "xx0" following "0" will cause a trie like this to be
created:
c=\0
c=0 "0"
c=0 "xx0" <-- note the c is incorrect here, causing "00" to be
c=O "FOO" deduplicated to it
c=R "BAR"
This in effect caused the usb_modeswitch rule for Huawei modems to never
match and this never be switched to serial mode from mass storage.
Lubomir Rintel [Tue, 3 May 2016 20:29:03 +0000 (22:29 +0200)]
udev: fix build with DEBUG=1
Alternatively, this could perhaps be removed since it was broken for a
long time and noone seemed to care.
But it was helpful for me today.
Zbigniew Jędrzejewski-Szmek [Tue, 3 May 2016 20:24:09 +0000 (16:24 -0400)]
Merge pull request #3183 from crawford/preset-array
install: cache the presets before evaluating
Susant Sahani [Tue, 3 May 2016 19:54:26 +0000 (01:24 +0530)]
networkd: Add support to configure IPv6 preferred lifetime (#3102)
Closes #2166.
We only allow 0, infinity and forever.
infinity and forever is same.
Zbigniew Jędrzejewski-Szmek [Tue, 3 May 2016 19:50:21 +0000 (15:50 -0400)]
Merge pull request #3132 from ssahani/route-table
networkd: add support to set route table
Zbigniew Jędrzejewski-Szmek [Tue, 3 May 2016 18:50:43 +0000 (14:50 -0400)]
Merge pull request #3173 from poettering/dnssec-incapdns-fix
Dnssec incapdns fix
Alex Crawford [Thu, 28 Apr 2016 06:59:20 +0000 (23:59 -0700)]
install: cache the presets before evaluating
The previous implementation traversed the various config directories,
walking the preset files and parsing each line to determine if a service
should be enabled or disabled. It did this for every service which
resulted in many more file operations than neccessary.
This approach parses each of the preset entries into an array which is
then used to check if each service should be enabled or disabled.
Lennart Poettering [Tue, 12 Apr 2016 11:51:28 +0000 (13:51 +0200)]
test-dnssec: drop unused variable
(zjs: the tree is now back to
0b2abe0f034f7f2d8654adb11b516d1090ec9a9c.)
Zbigniew Jędrzejewski-Szmek [Tue, 3 May 2016 18:08:39 +0000 (14:08 -0400)]
Merge pull request #2921 from keszybz/do-not-report-masked-units-as-changed
Zbigniew Jędrzejewski-Szmek [Tue, 3 May 2016 18:08:23 +0000 (14:08 -0400)]
Revert "Do not report masked units as changed (#2921)"
This reverts commit
6d10d308c6cd16528ef58fa4f5822aef936862d3.
It got squashed by mistake.
Zbigniew Jędrzejewski-Szmek [Tue, 3 May 2016 18:08:16 +0000 (14:08 -0400)]
Revert "test-dnssec: drop unused variable"
This reverts commit
0bed31c1038c439cc5956fb44017ba28e503095b.
Zbigniew Jędrzejewski-Szmek [Tue, 3 May 2016 17:49:20 +0000 (13:49 -0400)]
Merge pull request #3111 from poettering/nspawn-remove-veth
Zbigniew Jędrzejewski-Szmek [Tue, 3 May 2016 17:46:40 +0000 (13:46 -0400)]
Revert "nspawn: explicitly remove veth links after use (#3111)"
This reverts commit
d2773e59de3dd970d861e9f996bc48de20ef4314.
Merge got squashed by mistake.
Susant Sahani [Tue, 3 May 2016 17:48:21 +0000 (23:18 +0530)]
networkd: add support to set route table
networkd: add support to set route table
1. add support to configure the table id.
if id is less than 256 we can fit this in the header of route as
netlink property is a char. But in kernel this proepty is a
unsigned 32. Hence if greater that 256 add this as RTA_TABLE
attribute.
2. we are not setting the address family now. Now set this property.
Susant Sahani [Tue, 3 May 2016 17:17:48 +0000 (22:47 +0530)]
sd-netlink: introduce route attribute set API
Introduce
1. sd_rtnl_message_route_set_table to set table ID
2. sd_rtnl_message_route_set_family to set family
Both required to configure route properties.
Susant Sahani [Tue, 3 May 2016 17:16:50 +0000 (22:46 +0530)]
sd-netlink: fix sd_netlink_message_append_data
Also remove the braces add_rtattr not required.
Zbigniew Jędrzejewski-Szmek [Sun, 1 May 2016 04:59:49 +0000 (00:59 -0400)]
network: get rid of DUID_TYPE_RAW
It wasn't used for anything after the recent changes.
Zbigniew Jędrzejewski-Szmek [Sat, 30 Apr 2016 00:16:55 +0000 (20:16 -0400)]
man: add a description of DUIDType and DUIDRawData
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.
Zbigniew Jędrzejewski-Szmek [Fri, 29 Apr 2016 23:08:37 +0000 (19:08 -0400)]
man: s/similar/similarly/
Zbigniew Jędrzejewski-Szmek [Fri, 29 Apr 2016 22:46:53 +0000 (18:46 -0400)]
test-networkd-conf: add tests for the parsing functions
Zbigniew Jędrzejewski-Szmek [Fri, 29 Apr 2016 03:23:45 +0000 (23:23 -0400)]
networkd: rework duid_{type,duid_type,duid,duid_len} setting
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
Zbigniew Jędrzejewski-Szmek [Sat, 30 Apr 2016 01:18:11 +0000 (21:18 -0400)]
dh-dhcp{,6}-client: change the semantics of DUID setting
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.
Zbigniew Jędrzejewski-Szmek [Sat, 30 Apr 2016 01:18:02 +0000 (21:18 -0400)]
dhcp-identifier: un-inline dhcp_validate_duid_len
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.
Zbigniew Jędrzejewski-Szmek [Tue, 3 May 2016 16:08:56 +0000 (12:08 -0400)]
sd-dhcp: change uint8_t *duid to const void*
Zbigniew Jędrzejewski-Szmek [Tue, 3 May 2016 15:52:44 +0000 (11:52 -0400)]
sd-dhcp{,6}-client: use standard indentation for functions args
Evgeny Vereshchagin [Tue, 3 May 2016 09:43:22 +0000 (12:43 +0300)]
tests: add test for #3166 (#3180)
Evgeny Vereshchagin [Tue, 3 May 2016 09:33:38 +0000 (12:33 +0300)]
man: rename TriggerLimitIntervalBurst to TriggerLimitBurst (#3181)
[/etc/systemd/system/test.socket:2] Unknown lvalue 'TriggerLimitIntervalBurst' in section 'Socket'
Follow-up for
8b26cdbd2a94
Sylvain Plantefève [Mon, 2 May 2016 23:43:37 +0000 (01:43 +0200)]
locale: Language fallbacks for fr_(BE|CA|CH|LU) to fr_FR (#3178)
Lennart Poettering [Mon, 2 May 2016 18:40:54 +0000 (20:40 +0200)]
Merge pull request #3162 from keszybz/alias-refusal
Refuse Alias, DefaultInstance, templated units in install (as appropriate)
Zbigniew Jędrzejewski-Szmek [Mon, 2 May 2016 17:56:07 +0000 (13:56 -0400)]
Merge pull request #3153 from poettering/async-clone
machined: make "clone" asynchronous, and support copy-based fall-back
Lennart Poettering [Mon, 2 May 2016 16:35:09 +0000 (18:35 +0200)]
update TODO
Lennart Poettering [Mon, 2 May 2016 16:29:28 +0000 (18:29 +0200)]
resolved: work around broken DNS zones set up by incapdns.net
incapdns.net returns NXDOMAIN for the SOA of the zone itself but is not a
terminal. This is against the specs, but we really should be able to deal with
this.
Previously, when verifying whether an NXDOMAIN response for a SOA/NS lookup is
rightfully unsigned we'd issue a SOA lookup for the parent's domain, to derive
the state from that. If the parent SOA would get an NXDOMAIN, we'd continue
upwards, until we hit a signed top-level domain, which suggests that the domain
actually exists.
With this change whenver we need to authenticate an NXDOMAIN SOA reply, we'll
request the DS RR for the zone first, and use for validation, since that this
must be from the parent's zone, not the incorrect lower zone.
Fixes: #2894
Lennart Poettering [Mon, 2 May 2016 15:12:35 +0000 (17:12 +0200)]
automount: move resetting of expiry timeout to automount_set_state()
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.
Lennart Poettering [Mon, 2 May 2016 14:51:45 +0000 (16:51 +0200)]
automount: rework propagation between automount and mount units
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
Lennart Poettering [Mon, 2 May 2016 14:41:41 +0000 (16:41 +0200)]
core: don't propagate service state to sockets as long as there's still a job for the service queued
Lennart Poettering [Mon, 2 May 2016 14:02:02 +0000 (16:02 +0200)]
fstab-generator: add newline before we start a new unit file section
We already did this for the [Mount] section, let's do the same for [Automount].
Lennart Poettering [Mon, 2 May 2016 14:01:39 +0000 (16:01 +0200)]
automount: add debug message when we get notified about mount state changes
Lennart Poettering [Mon, 2 May 2016 14:01:16 +0000 (16:01 +0200)]
core: remove duplicate code in automount_update_mount()
Also, fix indentation.
Lennart Poettering [Mon, 2 May 2016 13:07:40 +0000 (15:07 +0200)]
core: simplify unit_need_daemon_reload() a bit
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.
Lennart Poettering [Mon, 2 May 2016 12:50:27 +0000 (14:50 +0200)]
core: fix detection whether per-unit drop-ins changed
This fixes fall-out from
6d10d308c6cd16528ef58fa4f5822aef936862d3.
Until that commit, do determine whether a daemon reload was required we compare
the mtime of the main unit file we loaded with the mtime of it on disk for
equality, but for drop-ins we only stored the newest mtime of all of them and
then did a "newer-than" comparison. This was brokeni with the above commit,
when all checks where changed to be for equality.
With this change all checks are now done as "newer-than", fixing the drop-in
mtime case. Strictly speaking this will not detect a number of changes that the
code before above commit detected, but given that the mtime is unlikely to go
backwards, and this is just intended to be a helpful hint anyway, this looks OK
in order to keep things simple.
Fixes: #3123
Lennart Poettering [Mon, 2 May 2016 11:01:26 +0000 (13:01 +0200)]
core: move enforcement of the start limit into per-unit-type code again
Let's move the enforcement of the per-unit start limit from unit.c into the
type-specific files again. For unit types that know a concept of "result" codes
this allows us to hook up the start limit condition to it with an explicit
result code. Also, this makes sure that the state checks in clal like
service_start() may be done before the start limit is checked, as the start
limit really should be checked last, right before everything has been verified
to be in order.
The generic start limit logic is left in unit.c, but the invocation of it is
moved into the per-type files, in the various xyz_start() functions, so that
they may place the check at the right location.
Note that this change drops the enforcement entirely from device, slice, target
and scope units, since these unit types generally may not fail activation, or
may only be activated a single time. This is also documented now.
Note that restores the "start-limit-hit" result code that existed before
6bf0f408e4833152197fb38fb10a9989c89f3a59 already in the service code. However,
it's not introduced for all units that have a result code concept.
Fixes #3166.
Lennart Poettering [Mon, 2 May 2016 09:26:40 +0000 (11:26 +0200)]
util: don't dump /proc/cpuinfo contents in debug info
This is hardly useful, it's trivial for developers to get that info by running
cat /proc/cpuinfo.
Fixes #3155
Lennart Poettering [Mon, 2 May 2016 09:14:46 +0000 (11:14 +0200)]
man: slightly extend the machinectl clone documentation
Lennart Poettering [Mon, 2 May 2016 09:14:13 +0000 (11:14 +0200)]
minor CODING_STYLE clarification
Lennart Poettering [Fri, 29 Apr 2016 18:35:14 +0000 (20:35 +0200)]
update TODO
Lennart Poettering [Fri, 29 Apr 2016 18:57:39 +0000 (20:57 +0200)]
machinectl: since clone/remove/copy verbs are possibly slow, turn off bus call timeout
By default we timeout all bus calls, but if we know that these bus calls might
be slow, let's explicitly turn the timeouts off.
Lennart Poettering [Fri, 29 Apr 2016 18:32:56 +0000 (20:32 +0200)]
machined: rework copy-from/copy-to operation to use generic Operation object
With this all potentially slow operations are done out-of-process,
asynchronously, using the same "Operation" object.