https://bugzilla.suse.com/show_bug.cgi?id=1217029 https://bugzilla.suse.com/show_bug.cgi?id=1217029#c21 Thomas Blume <thomas.blume@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(dimstar@opensuse. | |org) --- Comment #21 from Thomas Blume <thomas.blume@suse.com> --- (In reply to Thomas Blume from comment #20)
(In reply to Fabian Vogt from comment #16)
I had a look as well. Meanwhile it's the networkd_init module that fails: https://openqa.opensuse.org/tests/4194179#step/networkd_init/48
systemd-run -tM node1 /bin/bash -c "zypper lr -u" does not return.
While it appears like zypper got stuck, this is not the case. The zypper process finishes successfully (visible in logs) and inside the container it also reports that the run-uNR.service unit finished. So it appears to be the communication issue indicated by comment 1.
With the hint in comment#19 I could reproduce the issue on my local openQA setup. But unlike in the original test, where there is a timeout:
[2024-05-16T08:17:58.087198Z] [info] [pid:80064] ::: basetest::runtest: # Test died: command 'systemd-run -tM node1 /bin/bash -c "zypper lr -u"' timed out at /usr/lib/os-autoinst/testapi.pm line 926. testapi::assert_script_run("systemd-run -tM node1 /bin/bash -c \"zypper lr -u\"") called at opensuse/lib/networkdbase.pm line 28
The log shows that the systemd-run command returns with failure:
--> [2024-06-04T11:11:21.773323Z] [info] [pid:1987] ::: basetest::runtest: # Test died: command 'systemd-run -tM node1 /bin/bash -c "zypper lr -u"' failed at /usr/lib/os-autoinst/testapi.pm line 926. testapi::assert_script_run("systemd-run -tM node1 /bin/bash -c \"zypper lr -u\"") called at opensuse/lib/networkdbase.pm line 28 --<
Not sure what makes this difference. Investigating further.
systemd-run -tM node1 /bin/bash -c "zypper lr -u" fails on my test setup due to a pty allocation error. strace shows: --> [...] openat(AT_FDCWD, "/dev/pts/1", O_RDWR|O_NOCTTY|O_CLOEXEC) = -1 ENOENT (No such file or directory) close(5) = 0 close(7) = 0 exit_group(1) = ? +++ exited with 1 +++ --< However, the similar command: machinectl shell node1 succeeds. According to the documentation at https://www.freedesktop.org/software/systemd/man/latest/systemd-run.html# 'systemd-run -tM' is for starting an interactive shell. This is not required for the test and the manpage states: --> [...] Note that machinectl(1)'s shell command is usually a better alternative for requesting a new, interactive login session on the local host or a local container. [...] --< For the non-interactive test run, the command: systemd-run -PM node1 /bin/bash -c "zypper lr -u" can be used. My test setup succeeds with the following patch: --> diff --git a/lib/networkdbase.pm b/lib/networkdbase.pm index f763732fb..b90d61239 100644 --- a/lib/networkdbase.pm +++ b/lib/networkdbase.pm @@ -25,7 +25,7 @@ Run C<$script> in the systemd-nspawn container called C<$machine>. sub assert_script_run_container { my ($self, $machine, $script) = @_; - assert_script_run("systemd-run -tM $machine /bin/bash -c \"$script\""); + assert_script_run("systemd-run -PM $machine /bin/bash -c \"$script\""); } =head2 script_run_container --< Could you please try this? -- You are receiving this mail because: You are on the CC list for the bug.