avocado-vt icon indicating copy to clipboard operation
avocado-vt copied to clipboard

qemu_vm: Fix swtpm path too long for vTPM + ping-pong migration

Open PaulYuuu opened this issue 2 years ago • 4 comments

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]

PaulYuuu avatar Nov 24 '22 03:11 PaulYuuu

Hello @YongxueHong @yanglei-rh @qcheng-redhat, could you help review? Thanks.

PaulYuuu avatar Nov 24 '22 03:11 PaulYuuu

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)

yanglei-rh avatar Nov 24 '22 04:11 yanglei-rh

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

yanglei-rh avatar Nov 24 '22 04:11 yanglei-rh

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.

qcheng-redhat avatar Nov 25 '22 02:11 qcheng-redhat

Hello @YongxueHong, could you take a look?

PaulYuuu avatar Dec 08 '22 06:12 PaulYuuu