1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00
Commit Graph

16298 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
8f077bf94e Print kdbus path when opening fails
This makes it easier to debug what is going on.
2014-07-26 15:08:42 -04:00
Zbigniew Jędrzejewski-Szmek
4aa4d2ae97 update-done: include a short description in .updated
People might be confused where the file comes from, since the name is not
at all specific.

https://bugzilla.redhat.com/show_bug.cgi?id=1121301#c8
2014-07-26 15:08:42 -04:00
Zbigniew Jędrzejewski-Szmek
0c6ea3a4e2 Add utility function to append root to path 2014-07-26 15:08:42 -04:00
Zbigniew Jędrzejewski-Szmek
60731f32f1 systemctl: do not bother to mutate state on error
We will abort anyway.
2014-07-26 15:08:42 -04:00
Daniel Buch
5b6f6ebd63 analyze: fix seg-fault with no cl-argument
We need to check if argv[1] is set before compare
2014-07-26 15:08:42 -04:00
Karel Zak
7de80bfe2e Always check asprintf return code
There is a small number of the places in sources where we don't check
asprintf() return code and assume that after error the function
returns NULL pointer via the first argument. That's wrong, after
error the content of pointer is undefined.
2014-07-26 15:08:41 -04:00
Eric Cook
6d314eca15 shell-completion: prevent mangling unit names
Units with literal hex '\xFF' in their names has to be read
and printed properly.
dev-disk-byx2dlabel-root.device != dev-disk-by\x2dlabel-root.device
2014-07-26 15:08:41 -04:00
Tom Gundersen
ad8bc9ea50 sysctl.d: enable promote_secondaries by default
Without this, secondary addresses would get deleted when the primary one is. This is not
the desired behavior when one would like to transition from one address to another in the
same subnet (such as when a new IP address is given over DHCP).

In networkd, when given a new IP over DHCP we will add it, without explicitly removing the
old one first (and hence never have a window without an IP address configured). Assuming the
addresses are in the same subnet, that means that the old address is the primary and the new
address is the secondary one. Once the old address expires, the kernel will drop it. With the
old behavior this means that both addresses would be lost, which is clearly not what we want.
With the new behavior, only the old address is lost, and the new one is promoted to primary.

Reported by Michael Olbrich <m.olbrich@pengutronix.de>
2014-07-25 11:18:12 +02:00
Lukas Nykryn
deffddf1df busname: CLD_KILLED was used twice 2014-07-25 10:44:27 +02:00
Lukas Nykryn
e05aa2e02b bus-proxyd: fix incorrect comparison
We should be interested in k variable.
2014-07-25 10:25:06 +02:00
Lukas Nykryn
eb17e17859 bus-proxyd: fix incorrect comparison
Err can't be bigger then zero. Rest of the code uses negative Exxxx values.
2014-07-25 09:58:52 +02:00
Tom Gundersen
bfa695b5cc networkd: ipv4ll - default to setting up ipv4ll routes
This is necessary for non-ipv4ll hosts to communicate with ipv4ll-only hosts on the same link. Defaults
to being enabled, but can be opted out.

See: <http://avahi.org/wiki/AvahiAutoipd#Routes>
2014-07-25 02:14:23 +02:00
Tom Gundersen
3c072310d5 networkd: ipv4ll - drop unnecessary get_address() 2014-07-25 02:12:00 +02:00
Kay Sievers
2e5b17d013 udev: exclude MD from block device ownership event locking
MD instantiates devices at open(). This is incomptible with the
locking logic, as the "change" event emitted when stopping a
device will bring it back.
2014-07-24 23:37:35 +02:00
Tom Gundersen
fa94c34b08 libsystemd-network: use CLOCK_BOOTTIME instead of CLOCK_MONOTONIC where possible
The timeouts in the networking library (DHCP lease timeouts and similar) should not be affected
by suspend. In the cases where CLOCK_BOOTTIME is not implemented, it is still safe to fallback to
CLOCK_MONOTONIC, as the consumers of the library (i.e., networkd) _should_ renew the leases when
coming out of suspend.
2014-07-24 19:02:58 +02:00
Tom Gundersen
77ff2de999 time-util: add clock_boottime_or_monotonic
CLOCK_BOOTTIME is not supported by timerfd on older kernels, so for the time beeing,
use this helper instead which will fallback to CLOCK_MONOTONIC if CLOCK_BOOTTIME is
not supported.
2014-07-24 19:02:58 +02:00
Tom Gundersen
a854881616 sd-event: add support for CLOCK_BOOTTIME
This requires a very recent kernel (3.15), so care should be taken
when using this functionality.
2014-07-24 16:37:01 +02:00
Tom Gundersen
6f4dedb250 sd-network: expose DNS/NTP servers as strings
This avoids having to distinguish between IPv4 and IPv6, allowing us
to keep their internal orderings. The consumers now has to turn the
strings into addresses.
2014-07-23 23:54:52 +02:00
Tom Gundersen
6073b6f26a resolved: don't read DHCP leases
networkd will expose both statically configured DNS servers and servers
receieved over DHCP in sd_network_get_dns(), so no need to keep
the distinction in resolved.
2014-07-23 23:54:52 +02:00
Tom Gundersen
b0e39c8284 networkd: merge DNS and NTP entries when exporting
In the state files, do not distinguish where the various entries came from
(static or DHCP), but include them all in the same list.
2014-07-23 23:54:51 +02:00
Michael Biebl
36d054aae0 man: fix path for system-sleep hook directory 2014-07-23 23:36:22 +02:00
Karel Zak
cbfaff65cb docs: remove repeating words from man/*xml 2014-07-23 08:47:19 -04:00
Dan Williams
6946f79d98 dhcp-network: remove unused DHCP6_STATE_RS
Probably a left-over from when router solicitations were
requested in the DHCP6 code.  But since they are now separate,
this state is no longer needed.
2014-07-23 09:19:47 +02:00
Dan Williams
28cc555d85 networkd: set route protocol
All routes added by networkd are currently set RTPROT_BOOT, which according
to the kernel means "Route installed during boot" (rtnetlink.h).  But this
is not always the case as networkd changes routing after boot too.  Since
the kernel gives more detailed protocols, use them.

With this patch, user-configured static routes now use RTPROT_STATIC (which
they are) and DHCP routes use RTPROT_DHCP.  There is no define for IPv4LL
yet, so those are installed as RTPROT_STATIC (though perhaps RTPROT_RA is
better?).

[tomegun: fixup
src/network/networkd-link.c:972:33: error: too few arguments to function 'route_new_dynamic']
2014-07-23 09:19:32 +02:00
Lennart Poettering
82eb1e7efb update TODO 2014-07-23 02:00:40 +02:00
Lennart Poettering
934e9b10b4 resolved: most DNS servers can't handle more than one question per packet, hence let's not generate that 2014-07-23 02:00:40 +02:00
Lennart Poettering
7e8e0422ae resolved: implement negative caching 2014-07-23 02:00:40 +02:00
Lennart Poettering
faa133f3aa resolved: rework logic so that we can share transactions between queries of different clients 2014-07-23 02:00:40 +02:00
Lennart Poettering
a3eca41994 nss-myhostname: don't include assert.h twice 2014-07-23 02:00:39 +02:00
Zbigniew Jędrzejewski-Szmek
142c4ecaa9 man: merge systemd-verify with systemd-analyze 2014-07-21 22:33:51 -04:00
Zbigniew Jędrzejewski-Szmek
2c12a402cb shell-completion: systemd-analyze verify, systemctl link
Some zsh completion helpers were not installed, so completion
was broken.

Add systemd-analyze verify. Make systemctl link complete only
unit names.
2014-07-21 22:33:51 -04:00
Zbigniew Jędrzejewski-Szmek
1d3bc0177a Merge systemd-verify with systemd-analyze 2014-07-21 21:42:28 -04:00
Zbigniew Jędrzejewski-Szmek
1a40a3393e configure: add -Wno-typedef-redefinition
Message-ID: <CAJ+BJsz9Qy-JU25dUuGT2n0LMNzcOpoJNGNtbf_boSuT_6hONw@mail.gmail.com>
2014-07-21 21:07:19 -04:00
Jean-André Santoni
6589d0dba2 Add IFLA_VTI defines to missing.h 2014-07-21 21:04:44 -04:00
Zbigniew Jędrzejewski-Szmek
7dbb1d08f6 update-done: set proper selinux context for .updated
https://bugzilla.redhat.com/show_bug.cgi?id=1121806
2014-07-21 20:57:39 -04:00
Zbigniew Jędrzejewski-Szmek
9f1c19405a sysusers: fix selinux context of backup files
Also, fix fopen_temporary_label to set proper context. By chance,
all users so far used the same context, so the error didn't matter.

Also, check return value from label_init().

https://bugzilla.redhat.com/show_bug.cgi?id=1121806
2014-07-21 20:53:05 -04:00
Tom Gundersen
c9e738b911 networkd: bridge - use USEC_PER_MSEC macros
Lennart said:
> We have these nice USEC_PER_MSEC-style macro definitions which make it a
> little bit clearer what we are converting here from what into
> what... please use that instead of writing "1000"...
>
> (we stole those from gstreamer btw)
2014-07-21 20:54:09 +02:00
Susant Sahani
d9c52fa045 networkd: add support for bond options
The following bond options are supported by this patch.

MIIMonitorSec:
Specifies the frequency in milli-seconds that MII link
monitoring will occur.

UpDelaySec:
Specifies the delay time in milli-seconds to enable a link
after a link up status has been detected.

DownDelaySec:
Specifies the delay time in milli-seconds to disable a link
after a link failure has been detected.

changes:
1. Added gconf variables.
2. man page

conf:

[NetDev]
Name=bond1
Kind=bond

[Bond]
Mode=802.3ad
TransmitHashPolicy=layer2+3
LacpduTransmitRate=fast
MIIMonitorSec=1s
UpDelaySec=2s
DownDelaySec=8s

cat /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2+3 (2)
MII Status: up
MII Polling Interval (ms): 1000
Up Delay (ms): 2000
Down Delay (ms): 8000

802.3ad info
LACP rate: fast
Min links: 0
Aggregator selection policy (ad_select): stable
bond bond1 has no active aggregator

[tomegun: rephrased manpage, dropped bond_ prefix from variables]
2014-07-21 20:35:21 +02:00
Susant Sahani
fb1021a26d networkd: bond add support for lacp rate
LacpduTransmitRate
option specifies the rate in which link partner to transmit
LACPDU packets in 802.3ad mode.  Possible values
slow : Request partner to transmit LACPDUs every 30 seconds
fast : Request partner to transmit LACPDUs every 1 second
The default is slow.

chages:
1. Added enum bond_lacp_rate_table
2. gperf LacpduTransmitRate

Test:
conf file:
[NetDev]
Name=bond1
Kind=bond

[Bond]
Mode=802.3ad
LacpduTransmitRate=fast

test:
cat /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2+3 (2)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: fast
Min links: 0
Aggregator selection policy (ad_select): stable
bond bond1 has no active aggregator

[tomegun: renamed from LacpduTransmitRate to LACPTransmitRate, manpage fixes and
dropped bond_ prefix from variables]
2014-07-21 20:35:21 +02:00
Susant Sahani
227cdf2c7c networkd: add support for bond transmit hash policy
This patch adds support  the transmit hash policy to use
for slave selection in balance-xor, 802.3ad, and tlb modes

layer2, layer3+4, layer2+3, encap3+4, encap3+4

Added:
1. BondXmitHashPolicy
2. conf param TransmitHashPolicy

Test conf:
[NetDev]
Name=bond1
Kind=bond

[Bond]
Mode=802.3ad
TransmitHashPolicy=layer2+3

test output:
cat /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2+3 (2)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable
bond bond1 has no active aggregator

[tomegun: dropped bond_ prefix from new Bond variable, drop repeated man-page section]
2014-07-21 20:35:21 +02:00
Susant Sahani
801a04c81b sd-rtnl: uncomment bond rtnl constants 2014-07-21 20:35:21 +02:00
Tom Gundersen
aa9f114058 networkd: netdev - split NetDev struct into per-kind structs
Similarly to how unit types work.
2014-07-21 13:32:27 +02:00
Tom Gundersen
653912918f sd-network: drop get_ifindices
People should use rtnl for this, and then only query sd-network by the ifindices it finds.
2014-07-21 13:32:27 +02:00
Zbigniew Jędrzejewski-Szmek
0e8415f2e5 man: add systemd-verify(1) 2014-07-20 19:48:16 -04:00
Zbigniew Jędrzejewski-Szmek
78002a6781 systemd-verify: check man pages 2014-07-20 19:48:16 -04:00
Zbigniew Jędrzejewski-Szmek
8b835fccda systemd-verify: a simple tool for offline unit verification
This tool will warn about misspelt directives, unknown sections, and
non-executable commands. It will also catch the common mistake of
using Accept=yes with a non-template unit and vice versa.

https://bugs.freedesktop.org/show_bug.cgi?id=56607
2014-07-20 19:48:16 -04:00
Zbigniew Jędrzejewski-Szmek
cf7d80a5fe path-lookup: make SYSTEMD_UNIT_PATH more flexible
It can now contain more than one directory, and can be used
to only prepend, not totally override, the normal load path.
2014-07-20 19:48:16 -04:00
Zbigniew Jędrzejewski-Szmek
8328d8c633 test-cgroup-mask: fix masks in test and enable by default
Commit 637f421e5c ("cgroups: always propagate controller membership
to siblings") changed the mask propagation logic, but the test wasn't
updated.

Move to normal tests from manual tests, it should not touch the system
anymore.
2014-07-20 19:48:16 -04:00
Zbigniew Jędrzejewski-Szmek
c2ef6f8427 test-cgroup-mask: pass on kernels without memory controller
It seems that unit_get_siblings_mask returns the controllers
filtered by what is available, but get_members_mask and
get_cgroup_mask do not. This just fixes the test following the
symptoms.
2014-07-20 19:48:16 -04:00
Zbigniew Jędrzejewski-Szmek
1cd974edfd systemd: return the first error from manager_startup() 2014-07-20 19:48:16 -04:00