From: Frantisek Sumsal Date: Tue, 12 Dec 2023 22:01:31 +0000 (+0100) Subject: test: mask the mdmonitor.service X-Git-Tag: v256-rc1~1504 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=22e31655f3f9f54d932d4f48b92b36698e701729;p=thirdparty%2Fsystemd.git test: mask the mdmonitor.service It's pulled in by one of the udev rules (63-md-raid-arrays.rules) and it fails every time, because there's no valid email address in /etc/mdadm.conf: [ 5.778153] testsuite-64.sh[403]: mdadm: array /dev/md/mdmirror started. [ 5.819137] kernel: md/raid1:md127: not clean -- starting background reconstruction [ 5.819141] kernel: md/raid1:md127: active with 2 out of 2 mirrors [ 5.819159] kernel: md127: detected capacity change from 0 to 129024 [ 5.821950] kernel: md: resync of RAID array md127 ... [ 5.887192] mdadm[424]: mdadm: No mail address or alert command - not monitoring. [ 5.890772] systemd[1]: Starting mdmonitor.service... [ 5.891718] systemd[1]: Started mdmonitor.service. [ 5.892570] systemd[1]: mdmonitor.service: Main process exited, code=exited, status=1/FAILURE [ 5.892618] systemd[1]: mdmonitor.service: Failed with result 'exit-code'. And as we (re)assemble the MD devices multiple times, this gets quite noisy, especially since we later start hitting the service start rate limit. Fedora has the mdmonitor.service patched, so it won't start without /etc/mdadm.conf being present, but Arch uses the upstream unit which doesn't have such guard. Let's just mask the service completely, which replaces all that noise with one warning: [ 6.553583] testsuite-64.sh[294]: + udevadm wait --settle ... [ 6.580700] systemd[1]: sys-devices-virtual-block-md127.device: Failed to enqueue SYSTEMD_WANTS job, ignoring: Unit mdmonitor.service is masked. --- diff --git a/test/units/testsuite-64.sh b/test/units/testsuite-64.sh index 81edb0ab7a1..0e598cc6b3e 100755 --- a/test/units/testsuite-64.sh +++ b/test/units/testsuite-64.sh @@ -1159,6 +1159,10 @@ testcase_mdadm_lvm() { helper_check_device_units } +# Disable the mdmonitor service, since it fails if there's no valid email address +# configured in /etc/mdadm.conf, which just unnecessarily pollutes the logs +systemctl list-unit-files mdmonitor.service >/dev/null && systemctl mask --runtime mdmonitor.service + udevadm settle udevadm control --log-level debug lsblk -a