Commit Graph

68990 Commits

Author SHA1 Message Date
Mike Yuan
0cdffada3d nspawn-patch-uid: clarify that changing mode of symlink is unsupported 2023-11-25 19:12:20 +08:00
Mike Yuan
677e644530 Revert "nspawn-patch-uid: try fchmodat2() to restore mode of symlink"
This reverts commit 30462563b1.

fchmodat2(), while accepting AT_SYMLINK_NOFOLLOW as a valid flag,
always returns EOPNOTSUPP when operating on a symlink. The Linux kernel
simply doesn't support changing the mode of a symlink.

Fixes #30157
2023-11-25 19:12:15 +08:00
Yu Watanabe
6ba7c72910 Merge pull request #30119 from mrc0mmand/test-console
test: don't redirect stdout/stderr to console
2023-11-25 12:54:11 +09:00
Paymon MARANDI
b99e4922ea ukify: be more explicit about where to find ukify
when KERNEL_INSTALL_UKIFY is not supplied we set ukify to $PWD/ukify

that will fail (perhaps only for manual installations):
FileNotFoundError: [Errno 2] No such file or directory: '/usr/src/linux-6.7-rc1/ukify'

this will make sure we have a sane default for UKIFY

Signed-off-by: Paymon MARANDI <paymon@utubeipod.xyz>
2023-11-25 12:53:29 +09:00
huyubiao
c00b446d93 udevadm: exiting udevadm monitor normally under SIGTERM or SIGINT
Under SIGTERM or SIGINT, exit event and release resources, and exit udevadm monitor normally.
2023-11-25 12:53:10 +09:00
Yu Watanabe
33d11a2b69 analyze: return earlier when there is no path to be prepended
Follow-up for 2f6181ad4d.

Addresses the post-merge comment:
https://github.com/systemd/systemd/pull/30172#discussion_r1404209035
2023-11-25 12:52:59 +09:00
Yu Watanabe
fd097a79d5 Merge pull request #30188 from YHNdnzj/memory-accounting-followup
core: a few fixes and improvements for memory accounting
2023-11-25 12:52:48 +09:00
Yu Watanabe
2c29813da3 run: escape command for description
The command arguments may contain spurious characters, e.g. line-break.
When we use command arguments as a description of a unit, we should
escape them.

Fixes #30187.
2023-11-25 12:52:35 +09:00
Lennart Poettering
50f4469ed7 rules: don't condition usb-gadget.target target on 'add' action
The dependency should exist continously, like all our similar deps do.
Hence drop the "add" conditionalization.
2023-11-25 12:52:23 +09:00
Frantisek Sumsal
fa6f37c043 test: don't redirect stdout/stderr to console
Turns out that redirecting a lot of output to the console can have some
funny effects, like random kernel soft lockups. I spotted this in
various CIs, but it remained almost entirely hidden thanks to
`softlockup_panic=1`, until 1a36d2672f which introduced a couple of
tests that log quite a lot in a short amount of time. This, in
combination with newer kernel version, which, for some reason, seem to
be more susceptible to such soft lockups, made the Arch Linux jobs soft
lockup quite a lot, see [0].

While debugging this I also noticed that runs which don't redirect
stdout/stderr to the console are noticeably faster, e.g.:

    # TEST-71 nspawn + QEMU (KVM), StandardOutput=journal+console
    Elapsed (wall clock) time (h:mm:ss or m:ss): 0:24.64
    # TEST-71 nspawn + QEMU (KVM), StandardOutput=journal
    Elapsed (wall clock) time (h:mm:ss or m:ss): 0:17.95

    # TEST-71 nspawn + QEMU, StandardOutput=journal+console
    Elapsed (wall clock) time (h:mm:ss or m:ss): 2:04.70
    # TEST-71 nspawn + QEMU, StandardOutput=journal
    Elapsed (wall clock) time (h:mm:ss or m:ss): 1:44.48

    # TEST-04 QEMU, StandardOutput=journal+console
    Elapsed (wall clock) time (h:mm:ss or m:ss): 4:22.70
    # TEST-04 QEMU, StandardOutput=console
    Elapsed (wall clock) time (h:mm:ss or m:ss): 5:04.67

Given all this, let's effectively revert ba7abf79a5, and dump the
testsuite-related journal messages only after the test finishes, so they
don't go through the slow console.

Resolves: systemd/systemd-centos-ci#660

[0] https://github.com/systemd/systemd-centos-ci/issues/660
2023-11-24 18:00:07 +01:00
Mike Yuan
f17b07f4d7 core/cgroup: use the cached memory accounting value when cgroup is gone
Follow-up for 9824ab1f00

Fixes https://github.com/systemd/systemd/issues/28542#issuecomment-1825413237
2023-11-25 00:38:49 +08:00
Mike Yuan
bfb6b1214a bus-print-properties: prettify more unset properties 2023-11-25 00:38:49 +08:00
Mike Yuan
3f362012ce bus-print-properties: ignore CGROUP_LIMIT_MAX for Memory*{Current,Peak}
MemoryCurrent and MemoryAvailable are shown as "[not set]" when UINT64_MAX
(unset). Let's do the same for the newly-added Memory*{Current,Peak} properties.
2023-11-24 23:22:41 +08:00
Mike Yuan
35c08a56a1 core/dbus-unit: don't log cgroup v1 property name 2023-11-24 23:22:40 +08:00
Lennart Poettering
ed272a9ff5 update TODO 2023-11-24 15:17:46 +01:00
Frantisek Sumsal
c5035a30e2 test: don't make the final vacuum multiple of 8M
As this would usually mean we'd nuke everything, since there are two
open journals - system and user - both being 8M in size.
2023-11-24 11:51:27 +01:00
Frantisek Sumsal
09bdb9f121 test: clean up the save_journal() stuff a bit
Let's save all journals from the test machine instead of calling export
on each journal file separately, which makes the code less complicated
(and probably faster).
2023-11-24 11:51:27 +01:00
Luca Boccassi
36f4476361 Merge pull request #30172 from yuwata/analyze-verify-unit-path
analyze: do not prepend CWD to SYSTEMD_UNIT_PATH needlessly
2023-11-24 10:35:28 +00:00
Lennart Poettering
c7896cecea pcrextend: fix minor memory leak
Also, simplify the code a bit by using json_dispatch_unbase64_iovec().
2023-11-24 12:21:43 +09:00
Yu Watanabe
2bab4caaf9 login: do not clear wall message before shutting down
This fixes a regression caused by 5ed73478e1
and aa6123e85e.

With these commits, when Reboot dbus method or friends is called,
reset_scheduled_shutdown() is called before shutting down the system,
so the wall message was cleared.

As the wall message itself is unrelated to the scheduling of shutting
down systems, let's keep the message.

Fixes #30167.
2023-11-24 11:11:57 +08:00
Yu Watanabe
2f6181ad4d analyze: do not prepend the current working directory to SYSTEMD_UNIT_PATH needlessly
If the requested unit is not in the current working directory, it is not
necessary to include the current working directory in SYSTEMD_UNIT_PATH.

Follow-up for 45519d13a4.

Fixes #30166.
2023-11-24 05:28:14 +09:00
Yu Watanabe
ff7af46edb analyze: set SYSTEMD_UNIT_PATH in verify_generate_path()
Then, rename verify_generate_path() -> verify_set_unit_path().
2023-11-24 05:20:13 +09:00
Yu Watanabe
c131e8b706 analyze: shorten code a bit
No functional change, just refactoring.
2023-11-24 05:19:14 +09:00
Yu Watanabe
6636145b3e analyze: drop duplicated :
Before, this returns e.g. "/current_dir::",
After, this returns e.g. "/current_dir:".
2023-11-24 04:44:35 +09:00
Mike Yuan
b7c1f9eaf4 hibernate-resume: actually set HibernateInfo.offset
Follow-up for a628d933cc
2023-11-23 18:15:37 +00:00