Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtio_fs_nfs_migration_handler: Migration test with handler #4198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhencliu
Copy link
Contributor

@zhencliu zhencliu commented Nov 8, 2024

Testing --migration-verify-handles and --migration-confirm-paths over NFS

ID: 2971

@zhencliu zhencliu force-pushed the virtiofs_migration_handler branch 3 times, most recently from 19ee848 to f12a3fb Compare November 10, 2024 10:46
@zhencliu
Copy link
Contributor Author

Hi @hellohellenmao , would you please help to review this patch? Thanks.

@XueqiangWei
Copy link
Contributor

Hi @fbq815 , @xiagao, could you please help review it? Many thanks.

@fbq815
Copy link
Contributor

fbq815 commented Dec 5, 2024

@zhencliu we use memory-backend-file on s390x when we use memory-backend with virtio-fs, please reference to the usage of avocado-framework/avocado-vt@85915c0

@fbq815
Copy link
Contributor

fbq815 commented Dec 6, 2024

Test log on s390x:
RHEL.10:
s390x.io-github-autotest-qemu.virtio_fs_nfs_migration_handler.s390-virtio: PASS (54.05 s)

RHEL.9:
virtio_fs_nfs_migration_handler.s390-virtio: PASS (57.22 s)

@zhencliu the case LGTM and I'll ack once you update the note in the py file

cdroms += " virtio"
read_file_cmd = type %s\${test_file}
tail_name = Get-Content
cmd_tail_file = powershell -command "Get-Content %s\${test_file} -wait"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about calling it cmd_wait_file as 'Get-Content' use -wait parameter instead of -tail.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reply. Actually 'Get-Content -wait' does mostly like what 'tail -f' does on Linux, so I use cmd_tail_file, to keep consistent for both Linux and Windows

@xiagao
Copy link
Contributor

xiagao commented Dec 19, 2024

Hit the following error for win2025 guest. 2/2 failed
python3 ConfigTest.py --testcase=virtio_fs_nfs_migration_handler --guestname=Win2025

[stderr] Traceback (most recent call last):
[stderr] File "/usr/local/lib/python3.12/site-packages/avocado_vt/plugins/vt_runner.py", line 74, in runTest
[stderr] raise self.__status # pylint: disable-msg=E0702
[stderr] ^^^^^^^^^^^^^^^^^^^
[stderr] File "/usr/local/lib/python3.12/site-packages/avocado_vt/test.py", line 146, in setUp
[stderr] self._runTest()
[stderr] File "/usr/local/lib/python3.12/site-packages/avocado_vt/test.py", line 286, in _runTest
[stderr] run_func(self, params, env)
[stderr] File "/usr/local/lib/python3.12/site-packages/virttest/error_context.py", line 141, in new_fn
[stderr] return fn(*args, **kwargs)
[stderr] ^^^^^^^^^^^^^^^^^^^
[stderr] File "/root/avocado/data/avocado-vt/virttest/test-providers.d/downloads/io-github-autotest-qemu/qemu/tests/virtio_fs_nfs_migration_handler.py", line 261, in run
[stderr] close_file(session)
[stderr] File "/root/avocado/data/avocado-vt/virttest/test-providers.d/downloads/io-github-autotest-qemu/qemu/tests/virtio_fs_nfs_migration_handler.py", line 151, in close_file
[stderr] session.cmd_output(params["cmd_kill_tail"])
[stderr] File "/usr/local/lib/python3.12/site-packages/aexpect/client.py", line 1223, in cmd_output
[stderr] raise ShellTimeoutError(cmd, output) from error
[stderr] aexpect.exceptions.ShellTimeoutError: Timeout expired while waiting for shell command to complete: 'TASKKILL /F /IM powershell.exe /T' (output: '')

@zhencliu
Copy link
Contributor Author

Hit the following error for win2025 guest. 2/2 failed python3 ConfigTest.py --testcase=virtio_fs_nfs_migration_handler --guestname=Win2025

[stderr] Traceback (most recent call last): [stderr] File "/usr/local/lib/python3.12/site-packages/avocado_vt/plugins/vt_runner.py", line 74, in runTest [stderr] raise self.__status # pylint: disable-msg=E0702 [stderr] ^^^^^^^^^^^^^^^^^^^ [stderr] File "/usr/local/lib/python3.12/site-packages/avocado_vt/test.py", line 146, in setUp [stderr] self._runTest() [stderr] File "/usr/local/lib/python3.12/site-packages/avocado_vt/test.py", line 286, in _runTest [stderr] run_func(self, params, env) [stderr] File "/usr/local/lib/python3.12/site-packages/virttest/error_context.py", line 141, in new_fn [stderr] return fn(*args, **kwargs) [stderr] ^^^^^^^^^^^^^^^^^^^ [stderr] File "/root/avocado/data/avocado-vt/virttest/test-providers.d/downloads/io-github-autotest-qemu/qemu/tests/virtio_fs_nfs_migration_handler.py", line 261, in run [stderr] close_file(session) [stderr] File "/root/avocado/data/avocado-vt/virttest/test-providers.d/downloads/io-github-autotest-qemu/qemu/tests/virtio_fs_nfs_migration_handler.py", line 151, in close_file [stderr] session.cmd_output(params["cmd_kill_tail"]) [stderr] File "/usr/local/lib/python3.12/site-packages/aexpect/client.py", line 1223, in cmd_output [stderr] raise ShellTimeoutError(cmd, output) from error [stderr] aexpect.exceptions.ShellTimeoutError: Timeout expired while waiting for shell command to complete: 'TASKKILL /F /IM powershell.exe /T' (output: '')

Thanks Xiaoling, it seems it's easy to hit errors when testing on win2025, I will do some tests later, thanks for the verification

@hellohellenmao
Copy link
Contributor

Passed with rhel10 guest, and the log looks good to me. Thanks.

1-Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.0.x86_64.io-github-autotest-qemu.virtio_fs_nfs_migration_handler.q35 Finshed 2024-12-19 20:27:59 2024-12-19 20:30:53 PASS 173.988716

@zhencliu zhencliu force-pushed the virtiofs_migration_handler branch 4 times, most recently from edbe8b2 to 1ce0899 Compare January 17, 2025 08:12
Testing --migration-verify-handles and --migration-confirm-paths over NFS

Note we usually use memory-backend-file on s390x for the virtio-fs
testing on RHEL, but for the live migration scenario, we have to use
memory-backend-memfd due to RHEL-58831.

Signed-off-by: Zhenchao Liu <zhencliu@redhat.com>
@zhencliu zhencliu force-pushed the virtiofs_migration_handler branch from 1ce0899 to d621b84 Compare January 17, 2025 08:29
@zhencliu
Copy link
Contributor Author

Hi @xiagao The root cause is tasklist cannot list the whole powershell command in Win2025, I updated the code, it can now work fine.
Hi @fbq815 , memory-backend-file issue updated in both commit and cfg.

Test passed on Win2025/Win2022/RHEL9.6

@xiagao
Copy link
Contributor

xiagao commented Jan 21, 2025

Great, thanks @zhencliu. I might review those patches two or more weeks later as I'm busy on our projects recently.

@zhencliu
Copy link
Contributor Author

Great, thanks @zhencliu. I might review those patches two or more weeks later as I'm busy on our projects recently.

Sure. Take your time please, and thank you for your quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants