1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00
Commit Graph

56425 Commits

Author SHA1 Message Date
Yu Watanabe
c9333c236f dhcp-identifier: use offsetof()
Also use appropriate place to store UUID.
2022-02-16 16:23:54 +09:00
Zbigniew Jędrzejewski-Szmek
667030bff6 manager: add {} around cpu sets, use range formatting
We would print "Setting NUMA policy to bind, with nodes .".
This is not very clear, change it to "… with nodes {}.".

Also use range formatting for masks to make output shorter.
2022-02-16 08:07:20 +01:00
Zbigniew Jędrzejewski-Szmek
6b1fa53997 manager: add few ", ignoring" and adjust level in one message 2022-02-16 08:07:20 +01:00
Yu Watanabe
1147ce3a46
Merge pull request #22523 from DaanDeMeyer/systemd-networkd-tests-fixes
mkosi: Support running systemd-networkd-tests.py in QEMU
2022-02-16 16:04:14 +09:00
Yu Watanabe
702cf08fce core/execute: warn when threaded mode is detected
Prompted by #22486.
2022-02-16 15:59:03 +09:00
Yu Watanabe
084e7706c2 cgroup-util: introduce cg_is_threaded() 2022-02-16 15:55:32 +09:00
Evgeny Vereshchagin
bf6ef6b6a9 tests: allow running all the services with SYSTEMD_LOG_LEVEL
It should make it easier to figure out what exactly services do there.
For example, with SYSTEMD_LOG_LEVEL=debug userdbd (v249) prints
```
varlink-5: New incoming message: {"method":"io.systemd.UserDatabase.GetUserRecord","parameters":{}}
```
before it crashes and systemd-resolved prints
```
varlink-21: New incoming message: {"method":"io.systemd.Resolve.ResolveAddress","parameters":{"address":[127,0,0,1],"flags":0,"ifindex":1000000,"family":0}}
```
and those messages are helpful (especially when scripts causing them
aren't clever enough to keep track of random stuff they send to systemd
:-))
2022-02-16 07:50:51 +03:00
Daan De Meyer
1e86c83308 test: Prefix all network/netdev config files used by systemd-networkd-tests.py
Let's make sure these take preference over any generic network config files shipped
by the OS (in this case specifically, mkosi).
2022-02-15 22:53:43 +00:00
Daan De Meyer
e2bf0a72ea test: Skip test_macsec() until kernel panic is fixed 2022-02-15 22:53:40 +00:00
Daan De Meyer
0f1853e230 mkosi: Support running systemd-networkd-tests.py in QEMU
This commit adds the necessary packages for Fedora and Arch.
2022-02-15 22:11:39 +00:00
Max Gautier
f55fe53ffc docs: Correct WantedBy= regarding template units 2022-02-15 16:54:11 +01:00
Yu Watanabe
fc62d1c54f sd-dhcp6-client: add comment about ia_na and ia_pd 2022-02-15 23:36:45 +09:00
Daan De Meyer
0765763e51 test: Stop using TextTestRunner in systemd-networkd-tests.py
If we assign our own test runner, passing arguments stops working
as unittest won't instantiate its own test runner after it parses
the arguments from sys.argv.

Consequence is that the tests will write to stderr now instead of
stdout since it doesn't seem possible to configure the stream that
unittest.main() will instantiate its test runner with so it'll
default to sys.stderr.
2022-02-15 23:32:06 +09:00
Yu Watanabe
dedf2d0054 network: add support to create wlan virtual interface
Closes #18977.
2022-02-15 23:24:55 +09:00
Lennart Poettering
6783f31c9c
Merge pull request #22516 from keszybz/bit-and-pieces
Post-review fixups and other tiny improvements
2022-02-15 15:20:16 +01:00
Ludwig Nussel
4e076fc885 Revert "man: fix description of --force in halt(8) (#7392)"
This reverts commit 5d9adb5b60.
2022-02-15 14:58:03 +01:00
Lennart Poettering
ec00453b1c
Merge pull request #22412 from yuwata/sd-dhcp6-client-cleanups
sd-dhcp6-client: several fixes and cleanups
2022-02-15 14:18:55 +01:00
Zbigniew Jędrzejewski-Szmek
1e3eee8cf0 manager: if we are reexecuting, do not invoke any fallbacks
For https://bugzilla.redhat.com/show_bug.cgi?id=1986176:
if we are trying to reexecute, and this fails for any reason, we shouldn't
try to execute /sbin/init or /bin/sh. It is better to just freeze.
If we freeze it is easier to diagnose what happened, but if we execute
one of the fallbacks, we don't really know what will happen. In particular
the new init might just return, causing the machine to shut down. Or we
may successfully spawn /bin/sh, which could leave the machine open.
2022-02-15 11:13:26 +01:00
Zbigniew Jędrzejewski-Szmek
5409c6fcc5 manager: do not ignore the return value from the main loop
If manager_loop() fails, we would print an error message, but then actually
ignore the error in main(), and potentially execute the shutdown binary.
I'm not sure how likely this is to happen in practice, but it seems sloppy.
So let's do the cleanup, but actually freeze() if manager_loop() returned
an error.

invoke_main_loop() is refactored to return the manager objective. This way
we don't need to pass a separate parameter to specify whether we are
reexecuting. Subsequent patch will make further use of the returned objective.
2022-02-15 11:13:24 +01:00
Zbigniew Jędrzejewski-Szmek
073c0e20ef homework: avoid runtime formatting of a fixed string
Follow-up for fe9bd5ad36.
I checked that the formatted string has the same dashes as
before fe9bd5ad36.
2022-02-15 10:50:43 +01:00
Zbigniew Jędrzejewski-Szmek
2d5c770d5c share/gpt: add stringified defines for GPT partition types 2022-02-15 10:49:41 +01:00
Zbigniew Jędrzejewski-Szmek
8adba77294 NEWS: minor grammar adjustment
Follow-up for e41dcb8221.
2022-02-15 10:30:35 +01:00
Zbigniew Jędrzejewski-Szmek
71fae19e3f systemctl: expand error message 2022-02-15 10:26:58 +01:00
Zbigniew Jędrzejewski-Szmek
d33575eb4a docs: more internal links 2022-02-15 10:26:58 +01:00
Yu Watanabe
b4d55e8364 wifi-util: introduce nl80211_iftype_from_string() 2022-02-15 16:06:43 +09:00
Yu Watanabe
edb69db2b0 network: manage WLAN phy 2022-02-15 16:06:43 +09:00
Yu Watanabe
1d4312d5f9 network: netdev: add flag to skip kind check
It will be used in later commit.
2022-02-15 16:06:43 +09:00
Yu Watanabe
5d4a925af0 network: netdev: use request queue to create independent netdevs 2022-02-15 16:06:37 +09:00
Yu Watanabe
efa7b8adde network: netdev: increment reference counter on request
Otherwise, it may be freed on reload.
2022-02-15 15:54:02 +09:00
Yu Watanabe
d708bc6e4f network: netdev: make netdev_is_ready_to_create() return negative errno on fatal error 2022-02-15 15:54:02 +09:00
Yu Watanabe
709055dabb network: rename REQUEST_TYPE_STACKED_NETDEV -> REQUEST_TYPE_NETDEV_STACKED 2022-02-15 15:54:02 +09:00
Yu Watanabe
6dc07e095d meson: sort listed files 2022-02-15 15:54:02 +09:00
Frantisek Sumsal
b6fc52408a test: set ReadWritePaths=$BUILD_DIR when running w/ coverage
otherwise units using `DynamicUser=yes` won't be able to write the
coverage stats (currently affecting TEST-20-MAINPIDGAMES).

`DynamicUser=yes` implies `ProtectSystem=strict` and
`ProtectHome=read-only` and can't be overridden hence we need to
utilize `ReadWritePaths=` to work around that.
2022-02-14 21:59:33 +00:00
Yu Watanabe
f3376ee8fa
Merge pull request #22487 from poettering/bootspec-source-flags
bootctl: show all discovered entries, but show state + type in details
2022-02-15 04:45:59 +09:00
Yu Watanabe
88586e5d32
Merge pull request #22508 from poettering/stat-ino-compare
stat-util: add new stat_inode_same() helper
2022-02-15 04:45:31 +09:00
Yu Watanabe
d1e7fa02ca
Merge pull request #22507 from poettering/id128-compare-tweaks
sd-id128: comparison tweaks
2022-02-15 04:40:53 +09:00
Lennart Poettering
1d7150ec7f docs: make clear that if you use threaded cgroups you need to do that two levels down from your delegated cgroup
Prompted by: #22486
2022-02-14 19:06:40 +00:00
Lennart Poettering
d6b218e742 sd-daemon: use path_join() instead of manual path concat 2022-02-14 17:27:24 +01:00
Lennart Poettering
c20c77eff8 coredump: fix inode check
When checking if we look at the root directory we actually need to
compare both st_dev *and* st_ino. The existing check only checked the
latter. Fix that.
2022-02-14 17:27:21 +01:00
Lennart Poettering
675e7fc22c fd-util: use ERRNO_IS_XYZ() macros where appropriate 2022-02-14 17:27:18 +01:00
Lennart Poettering
a9dac7a6dd tree-wide: port various places over to new stat_inode_same() helper 2022-02-14 17:27:14 +01:00
Lennart Poettering
38db6211b5 stat-util: add helper stat_inode_same() for comparing stat's st_dev/st_ino in one
We do this all over the place, hence let's add a simple helper that does
this and particularly carefully and thoroughly.
2022-02-14 17:27:09 +01:00
Luca Boccassi
d74da762a3
Merge pull request #22506 from poettering/devnum-zero-btrfs-block-dev
gpt-auto: some (primarily cosmetic) fixes to backing block device detection in gpt-auto-generator/sd-device
2022-02-14 16:17:04 +00:00
Luca Boccassi
bfba9946a1
Merge pull request #22445 from lnussel/logind
logind: post review fixes
2022-02-14 16:16:39 +00:00
Lennart Poettering
d5ac1d4e10 bootspec: avoid zero size VLA
apparently some checkers don't like that. Let's be entirely safe here,
and use malloc() based allocation, given that the entries are user
controlled.
2022-02-14 16:24:04 +01:00
Lennart Poettering
f63b5ad935 boot: suppress XBOOTLDR if same device as ESP when enumerating entries
On my local system I linked up the ESP and XBOOTLDR partitions, and
ended up with duplicate entries being listed. Try hard to detect that
and only enumerate entries in the ESP if it turns out that both dirs
have the same dev_t.

This should detect both bind mounted and symlinked cases and should make
our list output less confusing.
2022-02-14 16:24:04 +01:00
Lennart Poettering
5635040091 bootspec: make sure all return values are initialized on return of find_esp_and_warn()
THis makes sure that find_esp_and_warn() + find_xbootldr_and_warn()
follow our usual coding style that on success all return values are
initialized. We got that right in most successful codepaths out of these
functions, but missed the one where the paths are manually overwritten
via env vars.
2022-02-14 15:44:07 +01:00
Lennart Poettering
bb68205768 bootctl: show more information about boot entry state in list
Let's improve display of boot entries and show what type they have (i.e.
boot loader spec type 1, or type 2, or auto-discovered or reported by
boot loader), and in particular mark entries the boot loader discovered
but we can't find (i.e. that likely vanished, or possibly couldn't be
found due to a misconfiguration) and that the boot loader didn't find
but we see (which are new, or possibly also the result of
misconfiguraiton).

This is supposed to be a replacement for #22161, but instead of hiding
vanished entries, highlights them, which I think is more appropriate for
a low-level tool such bootctl.

Replaces: #22161 #22398
2022-02-14 15:44:07 +01:00
Lennart Poettering
a78e472dfd bootspec: also collect/mark the "selected" boot entry (i.e. the one currently booted)
it's helpful and easy, so let's do it
2022-02-14 15:44:07 +01:00
Lennart Poettering
d403d8f0d6 bootspec: also parse new 'beep' loader.conf variable 2022-02-14 15:44:07 +01:00