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_localfs_migration: Migrate localfs with different cache modes #4184

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

Conversation

zhencliu
Copy link
Contributor

@zhencliu zhencliu commented Oct 25, 2024

ID: 2967

@zhencliu zhencliu force-pushed the virtiofs_migration_localfs branch 10 times, most recently from 70593da to 7eb9f47 Compare October 29, 2024 02:55
@zhencliu
Copy link
Contributor Author

hi @hellohellenmao , would you please review this patch? I am not sure if this patch meet your expectation, I just follow Your palorion case's steps

@zhencliu zhencliu force-pushed the virtiofs_migration_localfs branch 3 times, most recently from b8d9be4 to 54bce23 Compare October 29, 2024 14:37
@zhencliu
Copy link
Contributor Author

hi @hellohellenmao , would you please review it again? All test metrix was covered IMO, thanks.

The following testing matrix is covered:
cache mode:
auto, never, always, metadata
writeback:
enabled and disabled
allow-direct-io
enabled and disabled
fs:
single fs and two fs

Single node migration, with different localfs.

@zhencliu
Copy link
Contributor Author

Testing Win2022 and RHEL9.3 guest OS, all passed

@zhencliu zhencliu force-pushed the virtiofs_migration_localfs branch 3 times, most recently from 1662e04 to 2a44523 Compare October 29, 2024 23:15
@hellohellenmao
Copy link
Contributor

@xiagao Could you please help to take a review from windows perspective?

@xiagao
Copy link
Contributor

xiagao commented Nov 4, 2024

@xiagao Could you please help to take a review from windows perspective?

Sure, will work on it after other tasks on hand.

@hellohellenmao
Copy link
Contributor

@fbq815 Could you please help to review here? Thanks.

@zhencliu zhencliu force-pushed the virtiofs_migration_localfs branch from 2a44523 to 44f08b6 Compare November 6, 2024 02:05
@zhencliu zhencliu force-pushed the virtiofs_migration_localfs branch from 44f08b6 to 550fa74 Compare November 8, 2024 07:42
@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

6. Run the virtiofsd daemon to share the directory in step5
7. Boot the target guest with the virtiofs device in step5
8. Do migration from the source guest to the target guest
9. No error occurs, the virtiofs is mounted automatically and
Copy link
Contributor

Choose a reason for hiding this comment

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

@hellohellenmao Do we have steps to check if writing works on the virtiofs shared dir after migration?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#4190 covered the writing scenario

Copy link
Contributor

Choose a reason for hiding this comment

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

#4190 is based on NFS, @hellohellenmao what's your opinion? It's just a suggestion, I thought reading and writing are both important for virtiofs file system migration, they are the basic function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @xiagao and @hellohellenmao , based on your inputs, I would like to echo something to the file after migration to test it's writable, thanks.

@fbq815
Copy link
Contributor

fbq815 commented Dec 6, 2024

Test result on s390x:
RHEL.9:
(01/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_auto.s390-virtio: PASS (52.14 s)
(02/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_always.s390-virtio: PASS (54.58 s)
(03/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_never.s390-virtio: PASS (55.09 s)
(04/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_metadata.s390-virtio: PASS (53.14 s)
(05/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.writeback.cache_mode_auto.s390-virtio: PASS (55.75 s)
(06/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.writeback.cache_mode_always.s390-virtio: PASS (54.17 s)
(07/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.dio.cache_mode_never.s390-virtio: PASS (52.86 s)
(08/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_auto.s390-virtio: PASS (61.51 s)
(09/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_always.s390-virtio: PASS (61.18 s)
(10/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_never.s390-virtio: PASS (61.49 s)
(11/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_metadata.s390-virtio: PASS (61.71 s)
(12/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.writeback.cache_mode_auto.s390-virtio: PASS (62.19 s)
(13/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.writeback.cache_mode_always.s390-virtio: PASS (61.69 s)
(14/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.dio.cache_mode_never.s390-virtio: PASS (61.48 s)

RHEL.10:
(01/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_auto.s390-virtio: PASS (50.35 s)
(02/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_always.s390-virtio: PASS (53.46 s)
(03/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_never.s390-virtio: PASS (52.69 s)
(04/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_metadata.s390-virtio: PASS (52.44 s)
(05/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.writeback.cache_mode_auto.s390-virtio: PASS (52.57 s)
(06/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.writeback.cache_mode_always.s390-virtio: PASS (52.00 s)
(07/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.dio.cache_mode_never.s390-virtio: PASS (52.52 s)
(08/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_auto.s390-virtio: PASS (58.60 s)
(09/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_always.s390-virtio: PASS (59.91 s)
(10/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_never.s390-virtio: PASS (59.20 s)
(11/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_metadata.s390-virtio: PASS (59.02 s)
(12/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.writeback.cache_mode_auto.s390-virtio: PASS (58.71 s)
(13/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.writeback.cache_mode_always.s390-virtio: PASS (59.33 s)
(14/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.dio.cache_mode_never.s390-virtio: PASS (59.83 s)

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

@zhencliu zhencliu force-pushed the virtiofs_migration_localfs branch from 550fa74 to 526702b Compare December 17, 2024 02:28
@zhencliu zhencliu force-pushed the virtiofs_migration_localfs branch 2 times, most recently from 1f99626 to 522f96a Compare December 17, 2024 02:45
@zhencliu
Copy link
Contributor Author

Test result on s390x: RHEL.9: (01/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_auto.s390-virtio: PASS (52.14 s) (02/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_always.s390-virtio: PASS (54.58 s) (03/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_never.s390-virtio: PASS (55.09 s) (04/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_metadata.s390-virtio: PASS (53.14 s) (05/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.writeback.cache_mode_auto.s390-virtio: PASS (55.75 s) (06/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.writeback.cache_mode_always.s390-virtio: PASS (54.17 s) (07/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.dio.cache_mode_never.s390-virtio: PASS (52.86 s) (08/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_auto.s390-virtio: PASS (61.51 s) (09/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_always.s390-virtio: PASS (61.18 s) (10/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_never.s390-virtio: PASS (61.49 s) (11/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_metadata.s390-virtio: PASS (61.71 s) (12/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.writeback.cache_mode_auto.s390-virtio: PASS (62.19 s) (13/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.writeback.cache_mode_always.s390-virtio: PASS (61.69 s) (14/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.dio.cache_mode_never.s390-virtio: PASS (61.48 s)

RHEL.10: (01/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_auto.s390-virtio: PASS (50.35 s) (02/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_always.s390-virtio: PASS (53.46 s) (03/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_never.s390-virtio: PASS (52.69 s) (04/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_metadata.s390-virtio: PASS (52.44 s) (05/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.writeback.cache_mode_auto.s390-virtio: PASS (52.57 s) (06/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.writeback.cache_mode_always.s390-virtio: PASS (52.00 s) (07/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.dio.cache_mode_never.s390-virtio: PASS (52.52 s) (08/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_auto.s390-virtio: PASS (58.60 s) (09/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_always.s390-virtio: PASS (59.91 s) (10/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_never.s390-virtio: PASS (59.20 s) (11/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_metadata.s390-virtio: PASS (59.02 s) (12/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.writeback.cache_mode_auto.s390-virtio: PASS (58.71 s) (13/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.writeback.cache_mode_always.s390-virtio: PASS (59.33 s) (14/14) s390x.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.dio.cache_mode_never.s390-virtio: PASS (59.83 s)

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

Updated, note in cfg clarifies memory-backend-file can cause error while note in commit body shows the details

@zhencliu
Copy link
Contributor Author

Talked with @hellohellenmao , for the multifs scenario, we only cover cache mode auto.

I have to sign the commit (Verified) later for something wrong happened to my account

The following testing matrix is covered:
cache mode:
  auto, never, always, metadata
writeback:
  enabled and disabled
allow-direct-io
  enabled and disabled
count of fs:
  single fs and two fs

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 <[email protected]>
@zhencliu zhencliu force-pushed the virtiofs_migration_localfs branch from 522f96a to 18bf913 Compare December 18, 2024 04:57
@hellohellenmao
Copy link
Contributor

Tested with rhel guest, all the cases passed.

1-Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.0.x86_64.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_auto.q35 Finshed 2024-12-19 02:30:01 2024-12-19 02:31:54 PASS 113.193227
2-Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.0.x86_64.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_always.q35 Finshed 2024-12-19 02:31:55 2024-12-19 02:33:51 PASS 115.346431
3-Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.0.x86_64.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_never.q35 Finshed 2024-12-19 02:33:51 2024-12-19 02:35:49 PASS 118.485258
4-Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.0.x86_64.io-github-autotest-qemu.virtio_fs_localfs_migration.cache_mode_metadata.q35 Finshed 2024-12-19 02:35:50 2024-12-19 02:37:49 PASS 119.105633
5-Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.0.x86_64.io-github-autotest-qemu.virtio_fs_localfs_migration.writeback.cache_mode_auto.q35 Finshed 2024-12-19 02:37:50 2024-12-19 02:39:47 PASS 117.15594
6-Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.0.x86_64.io-github-autotest-qemu.virtio_fs_localfs_migration.writeback.cache_mode_always.q35 Finshed 2024-12-19 02:39:48 2024-12-19 02:41:41 PASS 113.372416
7-Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.0.x86_64.io-github-autotest-qemu.virtio_fs_localfs_migration.dio.cache_mode_never.q35 Finshed 2024-12-19 02:41:41 2024-12-19 02:43:36 PASS 114.780695
8-Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.0.x86_64.io-github-autotest-qemu.virtio_fs_localfs_migration.multifs.cache_mode_auto.q35 Finshed 2024-12-19 02:43:37 2024-12-19 02:45:37 PASS 120.357452

So the only comment from me for this patch is the same as Xiaoling mentioned that it's better to test the dir is writable after migration.
Thanks.

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.

4 participants