Tom Gundersen [Fri, 13 Nov 2015 14:05:58 +0000 (15:05 +0100)]
networkd: check explicit state rather than link->network
When deserializing we can now have an attached network without the various clients yet
having been configured. Hence, don't misused the link->network as a check to determine
if a link is ready to be used, but check the state explicitly.
Tom Gundersen [Fri, 13 Nov 2015 13:35:39 +0000 (14:35 +0100)]
networkd: dhcp6 - don't log about losing a lease we never had
Tom Gundersen [Fri, 13 Nov 2015 13:18:32 +0000 (14:18 +0100)]
Merge pull request #1879 from poettering/networkd-forward
stop managing per-interface IP forwarding settings
Michal Schmidt [Fri, 13 Nov 2015 13:04:34 +0000 (14:04 +0100)]
Merge pull request #1869 from poettering/kill-overridable
Remove support for RequiresOverridable= and RequisiteOverridable=
Lennart Poettering [Fri, 13 Nov 2015 12:59:50 +0000 (13:59 +0100)]
NEWS: add more stuff, and reorder things a bit
Lennart Poettering [Fri, 13 Nov 2015 12:52:00 +0000 (13:52 +0100)]
catalog: move danish catalog into the right place, and drop DOS line breaks
Lennart Poettering [Fri, 13 Nov 2015 12:12:50 +0000 (13:12 +0100)]
Merge pull request #1875 from marineam/fsck-after-resume
generator: order initrd fsck-root after local-fs-pre
Lennart Poettering [Fri, 13 Nov 2015 11:49:15 +0000 (12:49 +0100)]
networkd: stop managing per-interface IP forwarding settings
As it turns out the kernel does not support per-interface IPv6 packet
forwarding controls (unlike as it does for IPv4), but only supports a
global option (#1597). Also, the current per-interface management of the
setting isn't really useful, as you want it to propagate to at least one
more interface than the one you configure it on. This created much grief
(#1411, #1808).
Hence, let's roll this logic back and simplify this again, so that we
can expose the same behaviour on IPv4 and IPv6 and things start to work
automatically again for most folks: if a network with this setting set
is set up we propagate the setting into the global setting, but this is
strictly one-way: we never reset it again, and we do nothing for network
interfaces where this setting is not enabled.
Fixes: #1808, #1597.
Lennart Poettering [Fri, 13 Nov 2015 11:32:38 +0000 (12:32 +0100)]
networkd: rearrange checks when to write something into sysctl a bit
Move check whether ipv6 is available into link_ipv6_privacy_extensions()
to keep it as internal and early as possible.
Always check if there's a network attached to a link before we apply
sysctls. We do this for most of the sysctl functions already, with this
change we do it for all.
Lennart Poettering [Fri, 13 Nov 2015 11:30:57 +0000 (12:30 +0100)]
networkd: fix a couple of format string types
We really should use %i for ints, and %u for unsigneds, and be careful
what we pick depending on the type we want to print.
Lennart Poettering [Thu, 12 Nov 2015 23:54:56 +0000 (00:54 +0100)]
util-lib: optionally, when writing a string to a file, verify string on failure
With this change, the idiom:
r = write_string_file(p, buf, 0);
if (r < 0) {
if (verify_one_line_file(p, buf) > 0)
r = 0;
}
gets reduced to:
r = write_string_file(p, buf, WRITE_STRING_FILE_VERIFY_ON_FAILURE);
i.e. when writing the string fails and the new flag
WRITE_STRING_FILE_VERIFY_ON_FAILURE is specified we'll not return a
failure immediately, but check the contents of the file. If it matches
what we wanted to write we suppress the error and exit cleanly.
Michael Marineau [Fri, 13 Nov 2015 02:10:57 +0000 (18:10 -0800)]
generator: order initrd fsck-root after local-fs-pre
The initrd version of systemd-fsck-root.service must wait for
local-fs-pre.target just like systemd-fsck@.service to prevent
modifications to the filesystem prior to resuming from hibernation.
As-is my laptop routinely fails to resume due to fsck errors. The rest
of the time it is probably silently corrupting the filesystem.
Unlike normal boot, in the initrd systemd-fsck-root.service has no
special significance so it needs to be kept in sync with
systemd-fsck@.service. The name systemd-fsck-root.service is only used
to preserve state across switch-root.
Tom Gundersen [Fri, 13 Nov 2015 01:11:50 +0000 (02:11 +0100)]
Merge pull request #1871 from poettering/nspawn-veth-extra
nspawn: add ability to define additional, arbitrary veth links between host and container
Lennart Poettering [Thu, 12 Nov 2015 20:57:23 +0000 (21:57 +0100)]
update TODO
Lennart Poettering [Thu, 12 Nov 2015 20:54:28 +0000 (21:54 +0100)]
nspawn: add new --network-veth-extra= switch for defining additional veth links
The new switch operates like --network-veth, but may be specified
multiple times (to define multiple link pairs) and allows flexible
definition of the interface names.
This is an independent reimplementation of #1678, but defines different
semantics, keeping the behaviour completely independent of
--network-veth. It also comes will full hook-up for .nspawn files, and
the matching documentation.
Lennart Poettering [Thu, 12 Nov 2015 21:01:41 +0000 (22:01 +0100)]
Merge pull request #1870 from evverx/clarify_set_priority
core: use SD_EVENT_PRIORITY_NORMAL-n instead on -n
Evgeny Vereshchagin [Thu, 12 Nov 2015 19:54:34 +0000 (19:54 +0000)]
core: use SD_EVENT_PRIORITY_NORMAL-n instead on -n
Lennart Poettering [Thu, 12 Nov 2015 19:27:51 +0000 (20:27 +0100)]
Merge pull request #1868 from teg/ndisc-fix
sd-ndisc: add missing parens
Lennart Poettering [Thu, 12 Nov 2015 19:25:39 +0000 (20:25 +0100)]
update TODO
Lennart Poettering [Thu, 12 Nov 2015 19:14:33 +0000 (20:14 +0100)]
core: make sure to reset the bus error struct before reusing it
Otherwise the call might fail, because the error structure is already
initialized.
Lennart Poettering [Thu, 12 Nov 2015 19:13:42 +0000 (20:13 +0100)]
core: unify code that warns about jobs we fail to enqueue
This allows us to shorten our code a bit.
Lennart Poettering [Thu, 12 Nov 2015 18:52:31 +0000 (19:52 +0100)]
core: drop "override" flag when building transactions
Now that we don't have RequiresOverridable= and RequisiteOverridable=
dependencies anymore, we can get rid of tracking the "override" boolean
for jobs in the job engine, as it serves no purpose anymore.
While we are at it, fix some error messages we print when invoking
functions that take the override parameter.
Lennart Poettering [Thu, 12 Nov 2015 18:21:47 +0000 (19:21 +0100)]
core: remove support for RequiresOverridable= and RequisiteOverridable=
As discussed at systemd.conf 2015 and on also raised on the ML:
http://lists.freedesktop.org/archives/systemd-devel/2015-November/034880.html
This removes the two XyzOverridable= unit dependencies, that were
basically never used, and do not enhance user experience in any way.
Most folks looking for the functionality this provides probably opt for
the "ignore-dependencies" job mode, and that's probably a good idea.
Hence, let's simplify systemd's dependency engine and remove these two
dependency types (and their inverses).
The unit file parser and the dbus property parser will now redirect
the settings/properties to result in an equivalent non-overridable
dependency. In the case of the unit file parser we generate a warning,
to inform the user.
The dbus properties for this unit type stay available on the unit
objects, but they are now hidden from usual introspection and will
always return the empty list when queried.
This should provide enough compatibility for the few unit files that
actually ever made use of this.
Daniel Mack [Thu, 12 Nov 2015 17:18:45 +0000 (18:18 +0100)]
Merge pull request #1515 from poettering/install-symlink
install: follow unit file symlinks in /usr, but not /etc when looking for [Install] data and more
Lennart Poettering [Sat, 31 Oct 2015 21:12:51 +0000 (22:12 +0100)]
core: simplify handling of %u, %U, %s and %h unit file specifiers
Previously, the %u, %U, %s and %h specifiers would resolve to the user
name, numeric user ID, shell and home directory of the user configured
in the User= setting of a unit file, or the user of the manager instance
if no User= setting was configured. That at least was the theory. In
real-life this was not ever actually useful:
- For the systemd --user instance it made no sense to ever set User=,
since the instance runs in user context after all, and hence the
privileges to change user IDs don't even exist. The four specifiers
were actually not useful at all in this case.
- For the systemd --system instance we did not allow any resolving that
would require NSS. Hence, %s and %h were not supported, unless
User=root was set, in which case they would be hardcoded to /bin/sh
and /root, to avoid NSS. Then, %u would actually resolve to whatever
was set with User=, but %U would only resolve to the numeric UID of
that setting if the User= was specified in numeric form, or happened
to be root (in which case 0 was hardcoded as mapping). Two of the
specifiers are entirely useless in this case, one is realistically
also useless, and one is pretty pointless.
- Resolving of these settings would only happen if User= was actually
set *before* the specifiers where resolved. This behaviour was
undocumented and is really ugly, as specifiers should actually be
considered something that applies to the whole file equally,
independently of order...
With this change, %u, %U, %s and %h are drastically simplified: they now
always refer to the user that is running the service instance, and the
user configured in the unit file is irrelevant. For the system instance
of systemd this means they always resolve to "root", "0", "/bin/sh" and
"/root", thus avoiding NSS. For the user instance, to the data for the
specific user.
The new behaviour is identical to the old behaviour in all --user cases
and for all units that have no User= set (or set to "0" or "root").
Lennart Poettering [Sat, 31 Oct 2015 18:41:25 +0000 (19:41 +0100)]
man: improve the unit file enable state table a bit
Lennart Poettering [Thu, 8 Oct 2015 20:31:56 +0000 (22:31 +0200)]
install: follow unit file symlinks in /usr, but not /etc when looking for [Install] data
Some distributions use alias unit files via symlinks in /usr to cover
for legacy service names. With this change we'll allow "systemctl
enable" on such aliases.
Previously, our rule was that symlinks are user configuration that
"systemctl enable" + "systemctl disable" creates and removes, while unit
files is where the instructions to do so are store. As a result of the
rule we'd never read install information through symlinks, since that
would mix enablement state with installation instructions.
Now, the new rule is that only symlinks inside of /etc are
configuration. Unit files, and symlinks in /usr are now valid for
installation instructions.
This patch is quite a rework of the whole install logic, and makes the
following addional changes:
- Adds a complete test "test-instal-root" that tests the install logic
pretty comprehensively.
- Never uses canonicalize_file_name(), because that's incompatible with
operation relative to a specific root directory.
- unit_file_get_state() is reworked to return a proper error, and
returns the state in a call-by-ref parameter. This cleans up confusion
between the enum type and errno-like errors.
- The new logic puts a limit on how long to follow unit file symlinks:
it will do so only for 64 steps at max.
- The InstallContext object's fields are renamed to will_process and
has_processed (will_install and has_installed) since they are also
used for deinstallation and all kinds of other operations.
- The root directory is always verified before use.
- install.c is reordered to place the exported functions together.
- Stricter rules are followed when traversing symlinks: the unit suffix
must say identical, and it's not allowed to link between regular units
and templated units.
- Various modernizations
- The "invalid" unit file state has been renamed to "bad", in order to
avoid confusion between UNIT_FILE_INVALID and
_UNIT_FILE_STATE_INVALID. Given that the state should normally not be
seen and is not documented this should not be a problematic change.
The new name is now documented however.
Fixes #1375, #1718, #1706
Lennart Poettering [Thu, 8 Oct 2015 16:33:11 +0000 (18:33 +0200)]
install: never log from install functions
Instead, let the caller do that. Fix this by moving masked unit messages
into the caller, by returning a clear error code (ESHUTDOWN) by which
this may be detected.
Lennart Poettering [Thu, 8 Oct 2015 14:17:31 +0000 (16:17 +0200)]
install: various simplifications
Tom Gundersen [Thu, 12 Nov 2015 15:37:18 +0000 (16:37 +0100)]
sd-ndisc: add missing parens
Reported by Thomas Andersen.
Lennart Poettering [Thu, 12 Nov 2015 13:28:53 +0000 (14:28 +0100)]
Merge pull request #1865 from msekletar/build-man-list
build-sys: fix dependencies
Michal Sekletar [Thu, 12 Nov 2015 12:31:32 +0000 (13:31 +0100)]
build-sys: fix dependencies
update-man-list needs man/custom-entities.ent. Bug is nicely reproducible when
running make update-man-list.
Daniel Mack [Thu, 12 Nov 2015 12:57:38 +0000 (13:57 +0100)]
Merge pull request #1863 from poettering/network-man
man patch fix, and port journalctl --sync to use CLOCK_MONOTONIC timestamp files
Daniel Mack [Thu, 12 Nov 2015 12:54:54 +0000 (13:54 +0100)]
Merge pull request #1864 from poettering/remove-smack-fs-root-label
core: remove SmackFileSystemRootLabel= again
Lennart Poettering [Thu, 12 Nov 2015 12:40:21 +0000 (13:40 +0100)]
NEWS: begin putting together a NEWS section for the next release
Lennart Poettering [Thu, 12 Nov 2015 11:50:59 +0000 (12:50 +0100)]
core: remove SmackFileSystemRootLabel= again
Apparently, util-linux' mount command implicitly drops the smack-related
options anyway before passing them to the kernel, if the kernel doesn't
know SMACK, hence there's no point in duplicating this in systemd.
Fixes #1696
Lennart Poettering [Thu, 12 Nov 2015 11:33:10 +0000 (12:33 +0100)]
journald: fix accuracy of watchdog timer event
Adding 3/4th of the watchdog frequency as accuracy on top of 1/2 of the
watchdog frequency means we might end up at 5/4th of the frequency which
means we might miss the message from time to time.
Maybe fixes #1804
Lennart Poettering [Thu, 12 Nov 2015 10:17:01 +0000 (11:17 +0100)]
journald: rework --sync/--rotate logic to use CLOCK_MONOTONIC timestamp files
Previously, we'd rely on the mtime timestamps of the touch files to see
if our sync/rotation requests were already suppressed. This means we
rely on CLOCK_REALTIME timestamps. With this patch we instead store the
CLOCK_MONOTONIC timestamp *in* the touch files, and avoid relying on
mtime.
This should make things more reliable when the clock or underlying mtime
granularity is not very good.
This also adds warning messages if writing any of the flag files fails.
Lennart Poettering [Thu, 12 Nov 2015 10:16:17 +0000 (11:16 +0100)]
man: add more (and simpler examples) to network.link(5)
Daniel Mack [Thu, 12 Nov 2015 09:15:51 +0000 (10:15 +0100)]
Merge pull request #1857 from evverx/fix-unstoppable
tests: fix unstoppable service
Daniel Mack [Thu, 12 Nov 2015 09:15:19 +0000 (10:15 +0100)]
Merge pull request #1862 from torstehu/fix-typo2
core: fix typo
Torstein Husebø [Thu, 12 Nov 2015 07:23:21 +0000 (08:23 +0100)]
core: fix typo
Evgeny Vereshchagin [Thu, 12 Nov 2015 03:22:11 +0000 (03:22 +0000)]
tests: fix unstoppable service
[/etc/systemd/system/unstoppable.service:4] Unbalanced quoting,
ignoring: "/bin/echo 'I'm unstoppable!'"
Tom Gundersen [Wed, 11 Nov 2015 22:14:12 +0000 (23:14 +0100)]
Merge pull request #1854 from poettering/unit-deps
Dependency engine improvements
Lennart Poettering [Wed, 11 Nov 2015 21:54:56 +0000 (22:54 +0100)]
util-lib: use MODE_INVALID as invalid value for mode_t everywhere
Lennart Poettering [Wed, 11 Nov 2015 21:53:05 +0000 (22:53 +0100)]
core: fix dependency parsing
3d793d29059a7ddf5282efa6b32b953c183d7a4d broke parsing of unit file
names that include backslashes, as extract_first_word() strips those.
Fix this, by introducing a new EXTRACT_RETAIN_ESCAPE flag which disables
looking at any flags, thus being compatible with the classic
FOREACH_WORD() behaviour.
Lennart Poettering [Wed, 11 Nov 2015 20:00:42 +0000 (21:00 +0100)]
Merge pull request #1806 from mbachry/ipv6-test-fix
test: fix failing test-socket-util when running with ipv6.disable=1 kernel param
Lennart Poettering [Wed, 11 Nov 2015 19:47:07 +0000 (20:47 +0100)]
man: document automatic dependencies
For all units ensure there's an "Automatic Dependencies" section in the
man page, and explain which dependencies are automatically added in all
cases, and which ones are added on top if DefaultDependencies=yes is
set.
This is also done for systemd.exec(5), systemd.resource-control(5) and
systemd.unit(5) as these pages describe common behaviour of various unit
types.
Lennart Poettering [Wed, 11 Nov 2015 19:46:09 +0000 (20:46 +0100)]
core: simplify mount unit dependency generation a bit
Let's make the code a bit more explicit. Should not change execution
logic in any way.
Lennart Poettering [Wed, 11 Nov 2015 19:42:39 +0000 (20:42 +0100)]
core: simplify things a bit by checking default_dependencies boolean in callee, not caller
It's nicer to hide the check away in the various
xyz_add_default_dependencies() calls, rather than making it explicit in
the caller, and thus require deeper nesing.
Lennart Poettering [Wed, 11 Nov 2015 19:39:41 +0000 (20:39 +0100)]
core: pull in dbus.socket from Type=dbus services
Do so only on non-kdbus systems. And on non-kdbus systems don't bother
with .busname units.
Lennart Poettering [Wed, 11 Nov 2015 15:22:25 +0000 (16:22 +0100)]
core: change default deps of services to require sysinit.target instead of basic.target
With this change services by default will no longer require
basic.target, but instead only after it it via After=basic.target.
However, they will still Require= on sysinit.target.
This has the benefit that when booting into emergency mode it is
relatively safe to actviate individual services, as this will not pull
the entirety of basic.target anymore, thus avoid everything listed in
sockets.target and suchlike. However, during the usual boot no change
should be noticed.
Lennart Poettering [Wed, 11 Nov 2015 17:47:12 +0000 (18:47 +0100)]
Merge pull request #1851 from teg/networkd-drop-foreign
networkd: link - drop foreign config when configuring link
Lennart Poettering [Wed, 11 Nov 2015 17:46:15 +0000 (18:46 +0100)]
Merge pull request #1852 from filbranden/passenv6
execute: Add new PassEnvironment= directive (v4)
Filipe Brandenburger [Wed, 11 Nov 2015 17:24:34 +0000 (09:24 -0800)]
test-execute: Clarify interaction of PassEnvironment= and MANAGER_USER
@evverx brought up that test-execute runs under MANAGER_USER which
forwards all its environment variables to the services. It turns out it
only forwards those that were in the environment at the time of manager
creation, so this test was still working.
It was still possible to attack it by running something like:
$ sudo VAR1=a VAR2=b VAR3=c ./test-execute
Prevent that attack by unsetting the three variables explicitly before
creating the manager for the test case.
Also add comments explaining the interactions with MANAGER_USER and,
while it has some caveats, this tests are still valid in that context.
Tested by checking that the test running with the variables set from the
external environment will still pass.
Filipe Brandenburger [Sun, 8 Nov 2015 18:37:05 +0000 (10:37 -0800)]
test-execute: Add tests for new PassEnvironment= directive
Check the base case, plus erasing the list, listing the same variable
name more than once and when variables are absent from the manager
execution environment.
Confirmed that `sudo ./test-execute` passes and that modifying the test
cases (or the values of the set variables in test-execute.c) is enough
to make the test cases fail.
Evgeny Vereshchagin [Sat, 7 Nov 2015 18:54:12 +0000 (18:54 +0000)]
tests: add test for config_parse_pass_environ
Filipe Brandenburger [Mon, 7 Sep 2015 06:06:53 +0000 (23:06 -0700)]
execute: Add new PassEnvironment= directive
This directive allows passing environment variables from the system
manager to spawned services. Variables in the system manager can be set
inside a container by passing `--set-env=...` options to systemd-spawn.
Tested with an on-disk test.service unit. Tested using multiple variable
names on a single line, with an empty setting to clear the current list
of variables, with non-existing variables.
Tested using `systemd-run -p PassEnvironment=VARNAME` to confirm it
works with transient units.
Confirmed that `systemctl show` will display the PassEnvironment
settings.
Checked that man pages are generated correctly.
No regressions in `make check`.
Marcin Bachry [Wed, 11 Nov 2015 14:45:26 +0000 (15:45 +0100)]
test: fix failing test-socket-util when running with ipv6.disable=1 kernel param
The ability to use inet_pton(AF_INET6, ...) doesn't depend on kernel
ipv6 support (inet_pton is a pure libc function), so make ipv6 address
parsing tests unconditional.
Lennart Poettering [Wed, 11 Nov 2015 15:21:30 +0000 (16:21 +0100)]
journalctl: change repeated if checks into switch blocks
No functional changes.
Tom Gundersen [Fri, 2 Oct 2015 14:52:49 +0000 (16:52 +0200)]
networkd: link - drop foreign config when configuring link
This is a change in behavior:
Before we would never remove any state, only add to it, we now drop unwanted
state from any link the moment we start managing it.
Note however, that we still will not remove any foreign state added at runtime,
to avoid any feedback loops. However, we make no guarantees about coexisting
with third-party tools that change the state of the links we manage.
Lennart Poettering [Wed, 11 Nov 2015 15:04:29 +0000 (16:04 +0100)]
journalctl: refuse to --machine= in combination with --flush, --sync or --rotate
Lennart Poettering [Wed, 11 Nov 2015 13:50:05 +0000 (14:50 +0100)]
units: fix system.slice to require -.slice, instead of just want it
Daniel Mack [Wed, 11 Nov 2015 15:03:05 +0000 (16:03 +0100)]
Merge pull request #1843 from teg/ndisc
ndisc and dhcpv6
Tom Gundersen [Tue, 10 Nov 2015 20:45:41 +0000 (21:45 +0100)]
networkd: improve logging
Tom Gundersen [Tue, 10 Nov 2015 20:30:59 +0000 (21:30 +0100)]
networkd: link - track state of IPv6LL address
This is managed by the kernel, but we should track whether or not we have
a configured IPv6LL address. This fixes two issues:
- we now wait for IPv6LL before considering the link ready
- we now wait for IPv6LL before attempting to do NDisc or DHCPv6
these protocols relies on an LL address being available.
Tom Gundersen [Tue, 3 Nov 2015 12:02:16 +0000 (13:02 +0100)]
networkd: ndisc - handle router advertisement in userspace
Router Discovery is a core part of IPv6, which by default is handled by the kernel.
However, the kernel implementation is meant as a fall-back, and to fully support
the protocol a userspace implementation is desired.
The protocol essentially listens for Router Advertisement packets from routers
on the local link and use these to configure the client automatically. The four
main pieces of information are: what kind (if any) of DHCPv6 configuration should
be performed; a default gateway; the prefixes that should be considered to be on
the local link; and the prefixes with which we can preform SLAAC in order to pick
a global IPv6 address.
A lot of additional information is also available, which we do not yet fully
support, but which will eventually allow us to avoid the need for DHCPv6 in the
common case.
Short-term, the reason for wanting this is in userspace was the desire to fully
track all the addresses on links we manage, and that is not possible for addresses
managed by the kernel (as the kernel does not expose to us the fact that it
manages these addresses). Moreover, we would like to support stable privacy
addresses, which will soon be mandated and the legacy MAC-based global addresses
deprecated, to do this well we need to handle the generation in userspace. Lastly,
more long-term we wish to support more RA options than what the kernel exposes.
Tom Gundersen [Sun, 18 Oct 2015 16:25:58 +0000 (18:25 +0200)]
networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt=
The previous behavior:
When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was
enabled only if the relevant flags were passed in the Router Advertisement message.
Moreover, router discovery was performed even if AcceptRouterAdvertisements=false,
moreover, even if router advertisements were accepted (by the kernel) the flags
indicating that DHCPv6 should be performed were ignored.
New behavior:
If RouterAdvertisements are accepted, and either no routers are found, or an
advertisement is received indicating DHCPv6 should be performed, the DHCPv6
client is started. Moreover, the DHCP option now truly enables the DHCPv6
client regardless of router discovery (though it will probably not be
very useful to get a lease withotu any routes, this seems the more consistent
approach).
The recommended default setting should be to set DHCP=ipv4 and to leave
IPv6AcceptRouterAdvertisements unset.
Tom Gundersen [Tue, 10 Nov 2015 14:43:52 +0000 (15:43 +0100)]
networkd: dhcp6 - split up configure() method
Enabling address acquisition, configuring the client and starting the client are now
split out. This to better handle the client being repeatedly enabled due to router
advertisements.
Tom Gundersen [Mon, 19 Oct 2015 20:15:50 +0000 (22:15 +0200)]
sd-ndisc: introduce separate callbacks
As the data passed is very different, we introduce four different callbacks:
- Generic - router discovery timed out or state machine stopped
- Router - router and link configuration received
- Prefix onlink - configuration for an onlink prefix received
- Prefix autonomous - configuration for to configure a SLAAC address for a prefix received
Tom Gundersen [Thu, 22 Oct 2015 15:46:35 +0000 (17:46 +0200)]
sd-ndisc: notify user on STOP
Also, stop the state machine when we get into a broken state, rather than just notify the user.
Tom Gundersen [Tue, 3 Nov 2015 14:25:10 +0000 (15:25 +0100)]
sd-netlink: add support for RTA_PREF
Tom Gundersen [Wed, 11 Nov 2015 14:17:29 +0000 (15:17 +0100)]
sd-netlink: types - let tables be sized implicitly
This way we do not rely on the size MAX* constants from the kernel headers, as these will
be out-of-sync in case we have old headers and new defines in missing.h.
Tom Gundersen [Tue, 3 Nov 2015 14:11:38 +0000 (15:11 +0100)]
sd-netlink: add sd_rtnl_message_route_{s,g}et_flags()
Tom Gundersen [Tue, 10 Nov 2015 14:41:30 +0000 (15:41 +0100)]
sd-dhcp6-client: add is_running() method
Tom Gundersen [Tue, 10 Nov 2015 12:52:34 +0000 (13:52 +0100)]
networkd: address - drop the 'added' flag
Instead instantiate the kernel flags to TENTATIVE until the kernel
updates us with the real value.
Tom Gundersen [Tue, 3 Nov 2015 12:01:43 +0000 (13:01 +0100)]
networkd: dhcp4 - style fixes
Tom Gundersen [Wed, 11 Nov 2015 13:54:58 +0000 (14:54 +0100)]
Merge pull request #1848 from poettering/journal-sync
add journalctl --sync command and other stuff
Lennart Poettering [Wed, 11 Nov 2015 13:35:37 +0000 (14:35 +0100)]
systemctl: make sure list-jobs doesn't return failure on success
Lennart Poettering [Wed, 11 Nov 2015 13:32:26 +0000 (14:32 +0100)]
update TODO
Lennart Poettering [Wed, 11 Nov 2015 12:56:54 +0000 (13:56 +0100)]
journalctl: make --rotate synchronous, too
Of course, ideally we'd just use normal synchronous bus calls, but this
is out of the question as long as we rely on dbus-daemon (which logs to
journald, and thus cannot use to avoid cyclic sync loops). Hence,
instead, reuse the wait logic already implemented for --sync, and use a
signal in one direction, and a mtime watch file for the reply.
Lennart Poettering [Wed, 11 Nov 2015 11:59:09 +0000 (12:59 +0100)]
journalctl: add new --sync switch for syncing the journal to disk
With this new "--sync" switch we add a synchronous way to sync
everything queued to disk, and return only after that's complete. This
command gives the guarantee that anything queued before has hit the disk
before the command returns.
While we are at it, also improve the man pages and help text for
journalctl a bit.
Lennart Poettering [Wed, 11 Nov 2015 11:57:40 +0000 (12:57 +0100)]
systemctl: add a comment that clarifies why we do "return r" at the end of main()
To avoid confusion as outlined in #1845.
Lennart Poettering [Wed, 11 Nov 2015 11:55:32 +0000 (12:55 +0100)]
sd-bus: don't try to acquire connection selinux label unless selinux is actually enabled
Otherwise we might end up mistaking a SMACK label for an selinux label.
Also, fixes unexpect debug messages:
http://lists.freedesktop.org/archives/systemd-devel/2015-November/034913.html
Daniel Mack [Wed, 11 Nov 2015 11:12:33 +0000 (12:12 +0100)]
Merge pull request #1846 from marcosfrm/journalctl-shell-completion
shell-completion: journalctl: add -S and -U options
Tom Gundersen [Wed, 11 Nov 2015 11:10:19 +0000 (12:10 +0100)]
Merge pull request #1845 from poettering/revert-EXIT_SUCCESS
Revert "systemctl: return EXIT_SUCCESS on success"
Marcos Mello [Wed, 11 Nov 2015 10:29:46 +0000 (08:29 -0200)]
shell-completion: journalctl: add -S and -U options
Added by 66f5292
Lennart Poettering [Wed, 11 Nov 2015 09:59:11 +0000 (10:59 +0100)]
Revert "systemctl: return EXIT_SUCCESS on success"
This reverts commit
6a32563caa883bd11da1b255c38358e481c42ad7.
Daniel Mack [Wed, 11 Nov 2015 09:48:39 +0000 (10:48 +0100)]
Merge pull request #1844 from martinpitt/master
test-parse-util: cover negative numbers, leading spaces, and more range errors
Martin Pitt [Wed, 11 Nov 2015 09:05:00 +0000 (10:05 +0100)]
test-parse-util: cover negative numbers, leading spaces, and more range errors
Motivated by https://github.com/systemd/systemd/issues/1829 where negative
numbers were mis-handled on 32 bit platforms by safe_atou*().
Tom Gundersen [Wed, 11 Nov 2015 01:31:29 +0000 (02:31 +0100)]
Merge pull request #1837 from poettering/grabbag2
variety of fixes
Tom Gundersen [Wed, 11 Nov 2015 01:25:57 +0000 (02:25 +0100)]
Merge pull request #1839 from evverx/fix-systemctl-cancel
systemctl: fix cancel
Tom Gundersen [Wed, 11 Nov 2015 01:24:45 +0000 (02:24 +0100)]
Merge pull request #1841 from keszybz/remove-snapshot
Remove snapshot unit type
Tom Gundersen [Wed, 11 Nov 2015 01:22:11 +0000 (02:22 +0100)]
Merge pull request #1655 from ssahani/net
network: port to extract_first_word
Tom Gundersen [Wed, 11 Nov 2015 01:21:06 +0000 (02:21 +0100)]
Merge pull request #1838 from keszybz/trivialities
Trivialities
Evgeny Vereshchagin [Wed, 11 Nov 2015 01:17:13 +0000 (01:17 +0000)]
systemctl: return EXIT_SUCCESS on success
Zbigniew Jędrzejewski-Szmek [Sun, 8 Nov 2015 13:12:54 +0000 (14:12 +0100)]
Remove snapshot unit type
Snapshots were never useful or used for anything. Many systemd
developers that I spoke to at systemd.conf2015, didn't even know they
existed, so it is fairly safe to assume that this type can be deleted
without harm.
The fundamental problem with snapshots is that the state of the system
is dynamic, devices come and go, users log in and out, timers fire...
and restoring all units to some state from the past would "undo"
those changes, which isn't really possible.
Tested by creating a snapshot, running the new binary, and checking
that the transition did not cause errors, and the snapshot is gone,
and snapshots cannot be created anymore.
New systemctl says:
Unknown operation snapshot.
Old systemctl says:
Failed to create snapshot: Support for snapshots has been removed.
IgnoreOnSnaphost settings are warned about and ignored:
Support for option IgnoreOnSnapshot= has been removed and it is ignored
http://lists.freedesktop.org/archives/systemd-devel/2015-November/034872.html
Evgeny Vereshchagin [Wed, 11 Nov 2015 00:03:24 +0000 (00:03 +0000)]
systemctl: fix cancel
http://www.freedesktop.org/software/systemd/man/systemctl.html#cancel%20JOB...
> If no job ID is specified, cancel all pending jobs
Zbigniew Jędrzejewski-Szmek [Tue, 10 Nov 2015 16:36:11 +0000 (11:36 -0500)]
TODO: remove SYSTEMD_PAGER
This is already done in Fedora rawhide.
Zbigniew Jędrzejewski-Szmek [Tue, 10 Nov 2015 23:48:59 +0000 (18:48 -0500)]
man: normalize indentation in sd-detect-virt(1)