summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "units: do not soft-reboot before soft-reboot.target reached"Yu Watanabe2024-05-222-4/+3
| | | | | | | | This reverts commit 4263d7617f0e6ea741e227db223ac6085479165f. Still I think this is the way to go. But the change was merged after -rc2, and still discussion is continued. So, at least now let's revert it, and do that after v256-final is released if approved.
* test: also flush and rotate journal before readYu Watanabe2024-05-221-1/+12
| | | | | | Follow-up for a610ba00d923f148702e68b1661166e887759509. Fixes #32890.
* test: replace journal checkers with journalctl --follow + grep -mYu Watanabe2024-05-224-12/+17
| | | | | | | | | | Recently, for slow test environments, journalctl --sync was added to the loop in the timeout. However, journalctl --sync may be slow in such systems, and timeout easily triggered during syncing. Hopefully, reading journal with --follow and grep the output with an expected line should be efficient. Hopefully fixes #32712.
* Merge pull request #32963 from yuwata/test-64-btrfsYu Watanabe2024-05-221-5/+4
|\ | | | | test: lock device during running cryptsetup
| * test: lock device during running cryptsetupYu Watanabe2024-05-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On running cryptsetup, udevd detects two inotify events for the underlying device. Running the test on enough fast host, the expected symlinks based on UUID and disk label are created by the second event. During processing a uevent for a device, udevd disables the inotify watch for the device. If the test runs on slow system, the second inotify event may comes during a udev worker processing the synthesized uevent triggered by the first inotify event. Hence, no synthesized uevent for the second inotify event will be generated, and the expected symlinks will be never created. To prevent the issue, we need to lock the device during cryptsetup command is running. Fixes #32913.
| * Revert "test: wipe filesystem before moving to the next test case"Yu Watanabe2024-05-211-2/+0
|/ | | | | | This reverts commit 301d7ee6112c6f766ee63d1daed3cd9535a65053. This does not solve issue #32913.
* btrfs-util: add assert to fix Coverity warningLuca Boccassi2024-05-211-0/+2
| | | | | | | | | Coverity gets confused since the iterator change, so add an assert to indicate that this is allocated if n_old_groups is > 0 CID#1545922 Follow-up for 125cca1b51e19d9209a229fca4fb9d94d34c3e78
* Merge pull request #32962 from bluca/suse_modYu Watanabe2024-05-213-2/+3
|\ | | | | pkg/opensuse: switch to SHA1 fork
| * mkosi: explicitly install g++ in opensuseLuca Boccassi2024-05-211-0/+1
| | | | | | | | Not pulled in by default at build time
| * pkg/opensuse: switch to SHA1 forkLuca Boccassi2024-05-212-2/+2
| | | | | | | | | | | | | | | | src.opensuse.org switched to SHA256, which means it can no longer be used as a submodule in a SHA1 repository. Switch to a fork on Pagure that gets synced across and is still SHA1: https://code.opensuse.org/package/systemd.git
* | Merge pull request #32944 from yuwata/test-74Luca Boccassi2024-05-212-24/+42
|\ \ | | | | | | test: several changes for TEST-74-AUX-UTILS
| * | test: collect information about loopback device on failureYu Watanabe2024-05-211-1/+9
| | |
| * | test: wait for loop/backing_file attribute being removedYu Watanabe2024-05-211-0/+5
| | | | | | | | | | | | | | | | | | Hopefully fixes issue like https://github.com/systemd/systemd/issues/32680#issuecomment-2120959238 https://github.com/systemd/systemd/issues/32680#issuecomment-2122074805
| * | test: wait for unit generated from /proc/self/mountinfo to be unloadedYu Watanabe2024-05-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/systemd/systemd/issues/32680#issuecomment-2120974685. === May 21 02:45:08 TEST-74-AUX-UTILS.sh[2475]: + mountpoint /tmp/tmp.eaRV7lSbX2/mnt May 21 02:45:08 TEST-74-AUX-UTILS.sh[2476]: /tmp/tmp.eaRV7lSbX2/mnt is not a mountpoint May 21 02:45:08 TEST-74-AUX-UTILS.sh[2449]: + systemd-mount /dev/loop0 /tmp/tmp.eaRV7lSbX2/mnt May 21 02:45:08 systemd-mount[2477]: Failed to start transient mount unit: Unit tmp-tmp.eaRV7lSbX2-mnt.mount was already loaded or has a fragment file. ===
| * | test: also run some basic test cases on nspawnYu Watanabe2024-05-211-23/+23
| | |
| * | test: stop container when it is not necessary anymoreYu Watanabe2024-05-211-0/+2
| | |
* | | Merge pull request #32954 from YHNdnzj/run-forwarder-exitLuca Boccassi2024-05-213-9/+26
|\ \ \ | |_|/ |/| | run: when disconnected from PTY forwarder, exit event loop if not --wait
| * | man/systemd-run: beef up info regarding interaction between --pty, --pipe, ↵Mike Yuan2024-05-211-6/+15
| | | | | | | | | | | | and --wait
| * | run: when disconnected from PTY forwarder, exit event loop if not --waitMike Yuan2024-05-211-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up for ade0789fabbf01b95bf54d32f8cab1217a753f03 The change in behavior was partly intentional, as I think if both --wait and --pty are used, manually disconnecting from PTY forwarder should not result in systemd-run exiting with "Finished with ..." log. But we should check for --wait here. Closes #32953
| * | ptyfwd: add missing assertions for pty_forward_newMike Yuan2024-05-211-0/+3
| |/
* | Merge pull request #32957 from mrc0mmand/fix-coverage-buildsZbigniew Jędrzejewski-Szmek2024-05-212-1/+6
|\ \ | | | | | | test: make TEST-65-ANALYZE happy when built with gcov
| * | test: add a brief comment for the chattr checkFrantisek Sumsal2024-05-211-0/+3
| | | | | | | | | | | | Addresses: https://github.com/systemd/systemd/pull/32907#discussion_r1605919598
| * | test: make TEST-65-ANALYZE happy when built with gcovFrantisek Sumsal2024-05-211-1/+3
| | | | | | | | | | | | | | | | | | | | | systemd-analyze runs the generators in a sandbox, which makes gcov unhappy since it can't update its counters. Let's "silence" gcov in this particular case by telling it to look for gcov note files in /tmp (where shouldn't be any, so gcov won't try to update any counters).
* | | test: wait a bit before stopping/killing serviceYu Watanabe2024-05-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, when stopping the service, the last command may not be started yet, and the service manager may not send SIGTERM signal to the last command, but send SIGKILL on timeout. === May 21 08:23:24 test19-exit-cgroup.sh[437]: + disown May 21 08:23:24 test19-exit-cgroup.sh[438]: + sleep infinity May 21 08:23:24 test19-exit-cgroup.sh[437]: + systemd-notify --ready May 21 08:23:24 test19-exit-cgroup.sh[437]: + sleep infinity May 21 08:23:24 test19-exit-cgroup.sh[441]: + systemctl stop one May 21 08:23:24 test19-exit-cgroup.sh[443]: + sleep infinity (snip) May 21 08:23:24 systemd[1]: one.service: Changed running -> stop-sigterm May 21 08:23:24 systemd[1]: Stopping one.service - /tmp/test19-exit-cgroup.sh "systemctl stop one"... May 21 08:23:24 systemd[1]: Received SIGCHLD from PID 441 (systemctl). May 21 08:23:24 systemd[1]: Child 437 (bash) died (code=killed, status=15/TERM) May 21 08:23:24 systemd[1]: one.service: Child 437 belongs to one.service. May 21 08:23:24 systemd[1]: one.service: Main process exited, code=killed, status=15/TERM (success) May 21 08:23:24 systemd[1]: Child 439 (bash) died (code=killed, status=15/TERM) May 21 08:23:24 systemd[1]: one.service: Child 439 belongs to one.service. May 21 08:23:24 systemd[1]: Child 441 (systemctl) died (code=killed, status=15/TERM) May 21 08:23:24 systemd[1]: one.service: Child 441 belongs to one.service. May 21 08:23:24 systemd[1]: Child 442 (bash) died (code=killed, status=15/TERM) May 21 08:23:24 systemd[1]: one.service: Child 442 belongs to one.service. (snip) May 21 08:24:54 systemd[1]: one.service: State 'stop-sigterm' timed out. Killing. May 21 08:24:54 systemd[1]: one.service: Killing process 443 (sleep) with signal SIGKILL. May 21 08:24:54 systemd[1]: one.service: Changed stop-sigterm -> stop-sigkill May 21 08:24:54 systemd[1]: Received SIGCHLD from PID 443 (sleep). May 21 08:24:54 systemd[1]: Child 443 (sleep) died (code=killed, status=9/KILL) May 21 08:24:54 systemd[1]: one.service: Child 443 belongs to one.service. May 21 08:24:54 systemd[1]: one.service: Control group is empty. May 21 08:24:54 systemd[1]: one.service: Failed with result 'timeout'. May 21 08:24:54 systemd[1]: one.service: Service restart not allowed. May 21 08:24:54 systemd[1]: one.service: Changed stop-sigkill -> failed May 21 08:24:54 systemd[1]: one.service: Job 738 one.service/stop finished, result=done May 21 08:24:54 systemd[1]: Stopped one.service - /tmp/test19-exit-cgroup.sh "systemctl stop one". May 21 08:24:54 systemd[1]: one.service: Unit entered failed state. May 21 08:24:54 systemd[1]: one.service: Releasing resources... === Fixes #32947.
* | | logind: use SD_BUS_ERROR_ACCESS_DENIEDZbigniew Jędrzejewski-Szmek2024-05-211-1/+2
| |/ |/| | | | | | | | | | | As requested in post-merge review https://github.com/systemd/systemd/pull/32869#pullrequestreview-2068161094: > NotInControl error is really about session controllers, but this here really > is different.
* | po: Translated using Weblate (Indonesian)Andika Triwidada2024-05-211-3/+5
| | | | | | | | | | | | | | | | Currently translated at 100.0% (233 of 233 strings) Co-authored-by: Andika Triwidada <andika@gmail.com> Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/id/ Translation: systemd/main
* | shared/mountpoint-util: for old kernels, assume "norecovery" is supported by ↵Zbigniew Jędrzejewski-Szmek2024-05-211-1/+5
|/ | | | | | | btrfs Fixup for e3828d7103a99a15a1e947ba3063294ead590631, as requested in https://github.com/systemd/systemd/pull/32892#issuecomment-2117903328.
* Merge pull request #32869 from keszybz/dbus-release-sessionZbigniew Jędrzejewski-Szmek2024-05-213-11/+21
|\ | | | | Allow pam stack to call ReleaseSession
| * logind: make ReleaseSession "unprivileged" and allow closing of own sessionZbigniew Jędrzejewski-Szmek2024-05-203-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/systemd/systemd/issues/28514. Quoting https://github.com/systemd/systemd/issues/28514#issuecomment-1831781486: > Whenever PAM is enabled for a service, we set up the PAM session and then > fork off a process whose only job is to eventually close the PAM session when > the service dies. That services we run with service privileges, both to > minimize attack surface and because we want to use PR_SET_DEATHSIG to be get > a notification via signal whenever the main process dies. But that only works > if we have the same credentials as that main process. > > Now, if pam_systemd runs inside the PAM stack (which it normally does) it's > session close hook will ask logind to synchronously end the session via a bus > call. Currently that call is not accessible to unprivileged clients. And > that's the part we need to relax: allow users to end their own sessions. The check is implemented in a way that allows the kill if the sender is in the target session. I found 'sudo systemctl --user -M "zbyszek@" is-system-running' to be a convenient reproducer. Before: May 16 16:25:26 x1c systemd[1]: run-u24754.service: Deactivated successfully. May 16 16:25:26 x1c dbus-broker[1489]: A security policy denied :1.24757 to send method call /org/freedesktop/login1:org.freedesktop.login1.Manager.ReleaseSession to org.freedesktop.login1. May 16 16:25:26 x1c (sd-pam)[3036470]: pam_systemd(login:session): Failed to release session: Access denied May 16 16:25:26 x1c systemd[1]: Stopping session-114.scope... May 16 16:25:26 x1c systemd[1]: session-114.scope: Deactivated successfully. May 16 16:25:26 x1c systemd[1]: Stopped session-114.scope. May 16 16:25:26 x1c systemd[1]: session-c151.scope: Deactivated successfully. May 16 16:25:26 x1c systemd-logind[1513]: Session c151 logged out. Waiting for processes to exit. May 16 16:25:26 x1c systemd-logind[1513]: Removed session c151. After: May 16 17:02:15 x1c systemd[1]: run-u24770.service: Deactivated successfully. May 16 17:02:15 x1c systemd[1]: Stopping session-115.scope... May 16 17:02:15 x1c systemd[1]: session-c153.scope: Deactivated successfully. May 16 17:02:15 x1c systemd[1]: session-115.scope: Deactivated successfully. May 16 17:02:15 x1c systemd[1]: Stopped session-115.scope. May 16 17:02:15 x1c systemd-logind[1513]: Session c153 logged out. Waiting for processes to exit. May 16 17:02:15 x1c systemd-logind[1513]: Removed session c153. Edit: this seems to also fix https://github.com/systemd/systemd/issues/8598. It seems that with the call to ReleaseSession, we wait for the pam session close hooks to finish. I inserted a 'sleep(10)' after the call to ReleaseSession in pam_systemd, and things block on that, nothing is killed prematurely.
| * logind: group policy entries by interfaceZbigniew Jędrzejewski-Szmek2024-05-201-8/+8
| |
* | Merge pull request #32942 from yuwata/test-journal-sync-moreLuca Boccassi2024-05-204-6/+15
|\ \ | | | | | | test: sync journal before read
| * | test: sync journal before readYu Watanabe2024-05-203-4/+13
| | | | | | | | | | | | | | | | | | Similar to recent commits, e.g. f961f0e47c2caf9af735a22e7f23210e746d0c8b. Fixes #32926.
| * | test: call journalctl --sync just before reading journalsYu Watanabe2024-05-201-2/+2
| |/ | | | | | | | | | | Otherwise, journal entries comes during sleep may not be read. Follow-up for c22a112883a46e302dae587b809c459647363ceb.
* | test: extend timeout for DHCP/NDisc testsYu Watanabe2024-05-203-3/+3
| | | | | | | | Fixes https://github.com/systemd/systemd/pull/32932#issuecomment-2120424121.
* | btrfs-util: check current offset before readYu Watanabe2024-05-201-12/+37
|/ | | | Fixes #32936.
* analyze: do not print timestamps before "start of userspace"Zbigniew Jędrzejewski-Szmek2024-05-201-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have the following timestamp status: $ systemctl show systemd-fsck-root.service | grep InactiveExitTimestamp InactiveExitTimestamp=Thu 2023-11-02 12:27:24 CET InactiveExitTimestampMonotonic=15143158 $ systemctl show | grep UserspaceTimestamp UserspaceTimestamp=Thu 2023-11-02 12:27:25 CET UserspaceTimestampMonotonic=15804273 i.e. UserspaceTimestamp is before InactiveExit of systemd-fsck-root.service. This is fine, but on display, we'd subtract those values and print a huge negative value bogusly: $ build/systemd-analyze critical-chain systemd-remount-fs.service The time when unit became active or started is printed after the "@" character. The time the unit took to start is printed after the "+" character. systemd-remount-fs.service +137ms └─systemd-fsck-root.service @584542y 2w 2d 20h 1min 48.890s +45ms └─systemd-journald.socket └─system.slice └─-.slice In fact, list_dependencies_print() already had a branch where the check that 'times->activating > boot->userspace_time', but it didn't cover all cases. So make it cover both branches, and also change to '>=', since it's fine if something happened with the same timestamp. With the patch: $ build/systemd-analyze critical-chain systemd-remount-fs.service The time when unit became active or started is printed after the "@" character. The time the unit took to start is printed after the "+" character. systemd-remount-fs.service +42ms └─systemd-fsck-root.service └─systemd-journald.socket └─system.slice └─-.slice Fixes https://github.com/systemd/systemd/issues/17191.
* Merge pull request #32934 from bluca/logind_regression_mainLuca Boccassi2024-05-203-6/+8
|\ | | | | logind: do not fail creating a session when request is not from a unit
| * logind: do not fail creating a session when request is not from a unitLuca Boccassi2024-05-201-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running inside an LXC container the 'su' process will not be part of any unit or slice. manager_get_user_by_pid() which was used until v255 (included) does not fail if it cannot find a unit/slice, but simply returns 'not found'. Do the same in manager_get_session_by_pidref(). This was not detected as Semaphore CI does not reboot the testbed before the logind test, so the session is started by the old logind from the base distro, instead of the one being tested. Follow-up for 8494f562c8963d8a936b0598e23eab277ff29374 Follow-up for 5099a50d4398e190387d204f5df81cc176bd33e2 Fixes https://github.com/systemd/systemd/issues/32929
| * logind: add one more debug logLuca Boccassi2024-05-201-1/+4
| | | | | | | | Helped track down issue with session tracking
| * semaphore: use variable for Salsa repo URLLuca Boccassi2024-05-201-1/+2
| | | | | | | | Makes it easier to switch for debuggin
* | test: wait for partition device rather than the whole diskYu Watanabe2024-05-201-2/+2
| | | | | | | | Fixes #32931.
* | Merge pull request #32927 from yuwata/test-network-netdevsimLuca Boccassi2024-05-206-24/+43
|\ \ | |/ |/| test-network: workaround for netdevsim bug
| * test: install more kernel modules for Fedora imageYu Watanabe2024-05-201-0/+2
| | | | | | | | | | | | Otherwise, several tests for networkd are skipped. Follow-up for #32666.
| * test-network: also set custom altternative name for netdevsim interfaceYu Watanabe2024-05-205-14/+28
| | | | | | | | | | | | | | | | | | Due to the bug in kernel 6.9 caused by https://github.com/torvalds/linux/commit/8debcf5832c3e8a6baaea27c75ad8a6ba5077beb, the net_id udev builtin does not work for netdevsim interface. So, eni99np1 cannot be used with kernel 6.9 anymore. Workaround for #32910.
| * test-network: split out setup_netdevsim()Yu Watanabe2024-05-201-11/+14
| |
* | man: fix grammar for Name= option in systemd.linkdrewbug2024-05-201-1/+1
|/
* Merge pull request #32915 from yuwata/machine-id-setupLuca Boccassi2024-05-201-14/+25
|\ | | | | machine-id-setup: acquire machine ID from /run/machine-id if possible
| * machine-id-setup: acquire machine ID from /run/machine-id if possibleYu Watanabe2024-05-191-13/+24
| | | | | | | | | | | | | | | | If machine ID is previously stored at /run/machine-id, then let's reuse it. This is important on switching root and /etc/machine-id was previously a mount point. Fixes #32908.
| * machine-id-setup: use empty_or_root()Yu Watanabe2024-05-191-1/+1
| |
* | test: sync journal before starting testYu Watanabe2024-05-191-2/+12
| | | | | | | | | | | | Follow-up for c22a112883a46e302dae587b809c459647363ceb. Hopefully fixes #32712.