os-autoinst / openQA

openQA web-frontend, scheduler and tools.
http://openqa.opensuse.org/
GNU General Public License v2.0
319 stars 209 forks source link

Feature Request: Stop displaying the latest image in 'Live View' after qemu has stopped #5180

Open rclobus opened 1 year ago

rclobus commented 1 year ago

Scenario

I have some openQA tests that generate hard disk images, which are repacked at the end of the test (by qemu-img convert). During the repacking, the test is in the state 'running' and the last available screenshot is shown in the live view. However, since the VM is already shut down, there is nothing to show. The screenshot is often from several seconds before the shutdown, so it shows a stale image. At first glance, I would (incorrectly) interpret this as a hanging job, because the conversion takes 10 minutes, during which only the last line from the log shows what is happening.

Feature request

After qemu has been stopped, can be screenshot from 'Live View' be replaced by a message, e.g. 'The VM has shut down'?

Details

openQA version 4.6.1674490999.b00c12673-2 (as packaged for Debian)

Snippet from the log file during the repacking

[2023-06-03T12:48:18.305656+02:00] [debug] [pid:24966] QEMU status is not 'shutdown', it is 'running'
[2023-06-03T12:48:19.307556+02:00] [debug] [pid:24966] EVENT {"data":{"guest":true,"reason":"guest-shutdown"},"event":"SHUTDOWN","timestamp":{"microseconds":436529,"seconds":1685789298}}
[2023-06-03T12:48:19.307809+02:00] [debug] [pid:24966] EVENT {"event":"STOP","timestamp":{"microseconds":488599,"seconds":1685789298}}
[2023-06-03T12:48:19.371633+02:00] [debug] [pid:24965] ||| finished _console_shutdown tests (runtime: 104 s)
[2023-06-03T12:48:19.374226+02:00] [debug] [pid:24937] stopping autotest process 24965
[2023-06-03T12:48:19.381098+02:00] [debug] [pid:24937] [autotest] process exited: 0
[2023-06-03T12:48:19.481642+02:00] [debug] [pid:24937] done with autotest process
[2023-06-03T12:48:19.482252+02:00] [debug] [pid:24937] stopping command server 24957 because test execution ended
[2023-06-03T12:48:19.482374+02:00] [debug] [pid:24937] isotovideo: informing websocket clients before stopping command server: [http://127.0.0.1:20023/3rGmd0aIu8XHHmX7/broadcast](http://127.0.0.1:20023/3rGmd0aIu8XHHmX7/broadcast%3C/span%3E)
[2023-06-03T12:48:19.499446+02:00] [debug] [pid:24937] commands process exited: 0
[2023-06-03T12:48:19.599953+02:00] [debug] [pid:24937] done with command server
[2023-06-03T12:48:19.600051+02:00] [debug] [pid:24937] isotovideo done
[2023-06-03T12:48:19.601083+02:00] [debug] [pid:24937] backend shutdown state: 1
[2023-06-03T12:48:19.601775+02:00] [info] [pid:24966] ::: OpenQA::Qemu::Proc::save_state: Saving QEMU state to qemu_state.json
[2023-06-03T12:48:20.708911+02:00] [debug] [pid:24966] Passing remaining frames to the video encoder
[2023-06-03T12:48:20.780630+02:00] [debug] [pid:24966] Waiting for video encoder to finalize the video
[2023-06-03T12:48:20.780742+02:00] [debug] [pid:24966] The built-in video encoder (pid 24975) terminated
[2023-06-03T12:48:20.781426+02:00] [debug] [pid:24966] QEMU: qemu-system-x86_64: terminating on signal 15 from pid 24966 (/usr/bin/isotovideo: backend)
[2023-06-03T12:48:20.782099+02:00] [debug] [pid:24966] sending magic and exit
[2023-06-03T12:48:20.782491+02:00] [debug] [pid:24937] received magic close
[2023-06-03T12:48:20.800903+02:00] [debug] [pid:24937] backend process exited: 0
[2023-06-03T12:48:20.903205+02:00] [info] [pid:24937] ::: backend::qemu::do_extract_assets: Extracting (?^u:^hd0$)
[2023-06-03T12:48:20.903467+02:00] [debug] [pid:24937] running `nice ionice qemu-img convert -c -O qcow2 /var/lib/openqa/pool/2/raid/hd0 assets_public/disk_live-build-testing_gnome-calamares.qcow2`

Snippet from the log, when finished

[2023-06-03T12:48:20.800903+02:00] [debug] [pid:24937] backend process exited: 0
[2023-06-03T12:48:20.903205+02:00] [info] [pid:24937] ::: backend::qemu::do_extract_assets: Extracting (?^u:^hd0$)
[2023-06-03T12:48:20.903467+02:00] [debug] [pid:24937] running `nice ionice qemu-img convert -c -O qcow2 /var/lib/openqa/pool/2/raid/hd0 assets_public/disk_live-build-testing_gnome-calamares.qcow2`
[2023-06-03T12:58:40.178769+02:00] [debug] [pid:24937] running `qemu-img info --output=json assets_public/disk_live-build-testing_gnome-calamares.qcow2`
[2023-06-03T12:58:40.216556+02:00] [debug] [pid:24937] stopping backend process 24966
[2023-06-03T12:58:40.216685+02:00] [debug] [pid:24937] done with backend process
okurz commented 1 year ago

tracked as https://progress.opensuse.org/issues/130381

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.