Commit graph

28555 commits

Author SHA1 Message Date
Thomas H. P. Andersen 3b31c46634 NEWS: fix typo (#5453) 2017-02-25 09:19:26 -05:00
Martin Pitt 4059584718 Merge pull request #5449 from keszybz/blkd-error-handling
blkid error handling
2017-02-25 12:25:27 +01:00
Zbigniew Jędrzejewski-Szmek 5a36dddca3 Merge pull request #5429 from GiedriusS/master
coredumpctl: implement --since/--until (-S/-U) for info/list verbs
2017-02-24 21:35:38 -05:00
Zbigniew Jędrzejewski-Szmek 78e4f19ebc Merge pull request #5444 from poettering/cgroups-revert-no-error
Revert "core: simplify cg_[all_]unified()" and more.
2017-02-24 18:48:57 -05:00
Giedrius Statkevičius 15710d4479 shell-completion: include the new coredumpctl options 2017-02-24 21:30:59 +02:00
Giedrius Statkevičius 4ab2753e36 man/coredumpctl: document the new options -S/-U 2017-02-24 21:30:41 +02:00
Giedrius Statkevičius 32485d0904 coredumpctl: implement --since/--until (-S/-U) for info/list verbs
Implement --since/--until (-S/-U) in the same fashion as journalctl.
This lets the user filter the results a bit so it would be easier to
find relevant info in case there were many core dumps.
2017-02-24 21:29:40 +02:00
AsciiWolf 13e785f7a0 Fix missing space in comments (#5439) 2017-02-24 18:14:02 +01:00
Lennart Poettering 4bb652ac2f cgroup: rework cg_all_unified()
Let's just check the unified level, directly. There's really no value in
wrapping cg_unified_controllers() with this, i.e. potentially do string
comparison when there's no reason to.

Also, this makes the clal more alike cg_hybrid_unified().
2017-02-24 18:05:31 +01:00
Lennart Poettering 1fcca10eb3 cgroup: rename cg_update_unified() → cg_unified_update()
We usually put the noun first, the verb (i.e. method) secont, for
example in cg_unified_flush(), let's follow the logic here...
2017-02-24 18:03:09 +01:00
Lennart Poettering c22800e40e cgroup: rename cg_unified() → cg_unified_controller()
cg_unified() is a bit generic a name, let's make clear that it checks
whether a specified controller is in unified mode.
2017-02-24 18:00:04 +01:00
Lennart Poettering b4cccbc13a cgroup: change cg_unified() to possibly return errors again
We use our cgroup APIs in various contexts, including from our libraries
sd-login, sd-bus. As we don#t control those environments we can't rely
that the unified cgroup setup logic succeeds, and hence really shouldn't
assert on it.

This more or less reverts 415fc41cea.
2017-02-24 17:52:58 +01:00
Lennart Poettering fc9ae7178e cgroup-util: check unified_cache before invoking streq()
Just a minor optimization.
2017-02-24 15:53:19 +01:00
Lennart Poettering ecc0eab247 Merge pull request #4670 from htejun/systemd-controller-on-unified-v2
Systemd controller on unified v2
2017-02-23 16:23:02 +01:00
Evgeny Vereshchagin c07afaa5e5 Merge pull request #5434 from poettering/udev-log-revert
Udev log revert
2017-02-23 15:06:03 +03:00
Namhyung Kim b4e7bdcb53 journal: avoid duplicated call to get cgroup path (#5404)
The cg_pid_get_path_shifted() is called twice during
server_dispatch_message().  We can get rid of the second by passing the
path to dispatch_message_real().
2017-02-23 13:04:57 +01:00
Lennart Poettering b90ef60fbc Revert "udev: Introduce UDEV_PROPAGATE_LOG macro (#5302)"
This reverts commit c22569eeea.

Let's revert this for now, since it apparently doesn't fix the problem
at hand.
2017-02-23 12:36:25 +01:00
Lennart Poettering 070251f36b Revert "Makefile.am: add a \ (#5422)"
This reverts commit 00d1e0c9de.
2017-02-23 12:36:04 +01:00
Zbigniew Jędrzejewski-Szmek 0a05dcc09d test-cgroup-util: add a "test" to print out cg_is_*_wanted() values
This isn't terribly useful because /sys/fs/cgroup will usually be mounted.
But it at least allows checking if the values make sense in this case.
2017-02-22 19:58:06 -05:00
Zbigniew Jędrzejewski-Szmek c19739db9e cgroup-util: fix the case of default=unified, unified-cgroup-hierarchy=0
We should mount the hybrid hierarchy if the user disabled the unified
hierarchy on the kernel command line.
2017-02-22 19:58:06 -05:00
Peter Hutterer 4bbc2817f7 Merge pull request #5424 from segfault-cc/master
Added hwdb rule for E5570 laptop (PointingStick)
2017-02-23 10:02:17 +10:00
Lucas Werkmeister 00f331c141 man: journalctl: update --new-id128 format count (#5423)
The Python format was added in d489071fb3.
2017-02-22 13:58:01 -05:00
Zbigniew Jędrzejewski-Szmek 239a3d0954 cgroup-util: cache all cg_is_*_wanted answers, disable /sys/fs/cgroups/unified on unified
If we encounter an error in proc cmdline parsing, just treat that as permanent,
i.e. the same as if the option was not specified. Realistically, it is better
to use the same condition for all related mounts, then to have e.g.
/sys/fs/cgroup mounted and /sys/fs/cgroup/unified not. If we find something is
mounted and base our answer on that, cache that result too.

Fix the conditions so that if "unified" is used, make sure any "hybrid" mounts
are not mounted.
2017-02-22 12:57:43 -05:00
Zbigniew Jędrzejewski-Szmek be02637a3c Merge pull request #5421 from ssahani/net7
networkd: Do not set config to NULL immediately.
2017-02-22 11:56:16 -05:00
Zbigniew Jędrzejewski-Szmek 770c4777c9 man: update descriptions of argument-less kernel cmdline args
This updates the man page for the changes introduced in 1d84ad9445.
"=" is kep if the option is predominantly used with an argument, and dropped
otherwise.

v2:
 - update also description of log_color
 - drop '=' in all cases where it is optional
   (previous rule of dropping it only in some cases was just too arbitrary.)
2017-02-22 11:52:31 -05:00
Zbigniew Jędrzejewski-Szmek ee0755131d man: describe the cgroup hierarchy kernel commandline options
Fixes #4827.

v2:
- update for the inverted interpration of systemd.legacy_systemd_cgroup_controller
2017-02-22 11:52:31 -05:00
Zbigniew Jędrzejewski-Szmek 1b59cf04ae core/mount-setup: if unified hierarchy is not supported, fall back to legacy
We need this to gracefully support older or strangely configured kernels.

v2:
- do not install a callback handler, just embed the right conditions into
  cg_is_*_wanted()

v3:
- fix bug in cg_is_legacy_wanted()
2017-02-22 11:52:31 -05:00
Zbigniew Jędrzejewski-Szmek a4464b9522 Rename cg_is_unified_systemd_controller_wanted to cg_is_hybrid_wanted
Less typing and doesn't make the table so incredibly wide.
2017-02-22 11:52:31 -05:00
Zbigniew Jędrzejewski-Szmek f98220a22f build-sys: default to hybrid cgroup hierarchy
It is expected that general-purpose distributions might want to override this.
This commit is made separate from grandparent to make it easy to revert if
needed.

v2:
- use hybrid as the default
  (We tested that the default of unified seems boot correctly everywhere and behave
   correctly in general, but it is incompatible with docker/lxc and probably some
   other tools, so for now we default to hybrid. The new "hybrid" mode should work
   be OK for those tools.)

Fixes #4669.
2017-02-22 11:49:40 -05:00
Vitaly Sulimov 80196e36d0 Added hwdb rule for E5570 laptop (PointingStick)
Trackpoint sensivity is very high by default
https://bugs.freedesktop.org/show_bug.cgi?id=99860
2017-02-22 12:57:21 +03:00
Susant Sahani f7fe70ea31 networkd: address config add error checking
We not looking for hashmap_put return error code.
2017-02-22 11:11:28 +05:30
Susant Sahani fcc48287eb networkd: Do not set config to NULL immediately.
fd45e52 sets
n to NULL which leads to crash.

fixes: #5418
2017-02-22 10:55:03 +05:30
Susant Sahani 00d1e0c9de Makefile.am: add a \ (#5422)
fixes: #5419
2017-02-21 23:04:02 -05:00
Evgeny Vereshchagin b965427b59 Merge pull request #5409 from keszybz/test-env-util-memleak
test-env-util: fix typo leading to memleak
2017-02-22 04:02:57 +03:00
Lennart Poettering 05f426d2b8 NEWS: add a comment about udev's MemoryDenyWriteExecute= setting (#5414)
Apparently if people are adventurous enought to run Go programs in udev
rules they might run into problems with MemoryDenyWriteExecute=.

I am pretty sure the best way out is for the toolchain generating
programs incompatible with W^X to be fixed, but this still deserves
documentation.

This was forgotten for the 232 release, hence add it now, retroactively.

See: #5400
2017-02-21 19:36:12 -05:00
Susant Sahani c22569eeea udev: Introduce UDEV_PROPAGATE_LOG macro (#5302)
As per commit 25e773e "udev: switch to systemd logging functions"
Now log_set_max_level() in udev_new() overwites system wide log level.

Propagate the udev.conf setting to log_set_max_level()
only if udev_new() is called from within udevd or one of its helpers.

Introduce a UDEV_PROPAGATE_LOG macro that we set with -D on
the gcc command line for all udev binaries we build, but not
for any others. The log_set_max_level() call is guarded by an
ifdef check for that macro, so that it only effects the various
udev binaries.

closes: #4525
2017-02-22 00:16:13 +01:00
Thomas H. P. Andersen 0f5a443e8c coredump: fix assign in while loop (#5417)
From: #5393
2017-02-22 00:14:54 +01:00
Zbigniew Jędrzejewski-Szmek 5978bdd05f Merge pull request #5411 from poettering/various-pre-v233-fixes
Various pre v233 fixes.
2017-02-21 17:35:01 -05:00
Zbigniew Jędrzejewski-Szmek dd7e1d6298 udev-builtin-blkid: use -errno not -1 as error code
The code that calls this function doesn't care, but it looks bad.
2017-02-21 16:42:51 -05:00
Zbigniew Jędrzejewski-Szmek b382db9f3b tree-wide: simplify handling of blkid errors 2017-02-21 16:41:33 -05:00
Lennart Poettering bcab914f7f Revert "basic/strv: allow NULLs to be inserted into strv"
This reverts commit 18f71a3c81.

According to @keszybz we don't need this anymore, hence drop it:

18f71a3c81 (r102232368)
2017-02-21 21:55:44 +01:00
Lennart Poettering 48a601fe5d log: never log into foreign fd #2 in PID 1 or its pre-execve() children
Fixes: #5401
2017-02-21 21:55:43 +01:00
Lennart Poettering 525872bfab man: document that ProtectKernelTunables= and ProtectControlGroups= implies MountAPIVFS=
See: #5384
2017-02-21 21:55:43 +01:00
Lennart Poettering f5b84de2ab bootctl: create loader.conf only if it doesn't exist yet
If the snippet aleady exists, don't do anything, as the file was already
installed then.

(This also reworks the code to create the file atomically)

Fixes: #5396
2017-02-21 21:55:43 +01:00
Lennart Poettering 175d308cad bootctl: rework file copy routines to reuse copy_bytes() from copy.c
Also, make sure to reuse temporary file handling used elsewhere.
2017-02-21 21:55:43 +01:00
Lennart Poettering ce21ed5c61 copy: a plain unlink() works here too 2017-02-21 21:41:32 +01:00
Lennart Poettering 71994cff31 sd-netlink: don't give up on netlink on ENOBUFS
If our netlink input buffer overruns the kernel will send us ENOBUFS on
the next recvmsg(). Don't consider this a complete failure resulting in
closing of the netlink socket. Instead, simply continue (after debug
logging).

Of course, ideally we'd have a better strategy for this, and would have
a way to resync if this happens (as well as a scheme for cancelling all
ongoing asynchronous transactions), but for now let's at least not choke
fatally, and simply accept that we lost some messages and continue.

Note that if we lose messages when synchronously waiting for an
operation to complete, we'll still propagate the ENOBUFS up, to make the
individual transaction fail.

See: #5398

(This bug does not properly fix the issue, hence we should leave the bug
open.)
2017-02-21 21:41:32 +01:00
Lennart Poettering 94c4c62279 dissect: generate friendly error messages for more error conditions
Fixes: #5408
2017-02-21 21:41:32 +01:00
stuart-mclaren a3d8d68cc1 Fix check for signal in set (#5416)
IN_SET(SIGCONT, SIGKILL) will always evaluate to false.
The signal needs to be included as the first argument.

Fixup for 26f417d3e8.
2017-02-21 15:39:52 -05:00
Lennart Poettering 85266f9bba NEWS: document ExecStartPost change in NEWS (#5415)
Follow up for #4843.

Taking @joukewitteveen's suggestion into account:
https://github.com/systemd/systemd/pull/4843#issuecomment-280306811
2017-02-21 15:00:09 -05:00