avocado-vt
avocado-vt copied to clipboard
qemu_vm: Fix swtpm path too long for vTPM + ping-pong migration
The current workaround is adding "_copied" string into the swtpm path for vTPM migration. When we do ping-pong migration few times, the socket path is longer than system limitation(107), which raises "Path for UnioIO socket is too long". But actually the even times' migration can use the source vTPM socket, so here add an action to roll back the tpm.
ID: 2145135 Signed-off-by: Yihuang Yu [email protected]
Hello @YongxueHong @yanglei-rh @qcheng-redhat, could you help review? Thanks.
Test Pass: (1/1) Host_RHEL.m9.u2.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.2.0.x86_64.io-github-autotest-qemu.migrate.with_netperf.tcp.q35: PASS (1209.98 s)
After change the test log, its naming rules meet the expected results.
type=unixio,path=/root/avocado/data/avocado-vt/swtpm/avocado-vt-vm1_tpm0_copied_swtpm.sock
LGTM (4/6) Host_RHEL.m9.u2.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.2.0.x86_64.io-github-autotest-qemu.vsock_test.migration_with_vsock.q35: PASS (387.85 s)
After ping-pong migration: /root/avocado/data/avocado-vt/swtpm/avocado-vt-vm1_tpm0_copied_state, no duplicated copied appended.
Hello @YongxueHong, could you take a look?