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

vhost-user-blk reconnect parameter in configuration.toml not working as expected #9848

Open
markyangcc opened this issue Jun 14, 2024 · 0 comments · May be fixed by #9849
Open

vhost-user-blk reconnect parameter in configuration.toml not working as expected #9848

markyangcc opened this issue Jun 14, 2024 · 0 comments · May be fixed by #9849
Labels
bug Incorrect behaviour needs-review Needs to be assessed by the team.

Comments

@markyangcc
Copy link

markyangcc commented Jun 14, 2024

Issue Description

The vhost_user_reconnect_timeout_sec parameter in the configuration.toml file is intended to set the reconnect timeout for vhost-user devices. However, the actual log output consistently shows ReconnectTime as zero, which does not reflect the value specified in the configuration.

Actual Result

The log indicates that ReconnectTime is always zero, regardless of the configuration value set for vhost_user_reconnect_timeout_sec:

level=info msg="Attaching device" Index=1 ReconnectTime=0 SocketPath=/var/run/kata-containers/vhost-user/block/sockets/vhostblk7 Type=vhost-user-blk-pci device=/var/run/kata-containers/vhost-user/block/sockets/vhostblk7 name=containerd-shim-v2 pid=2922759

Expected Result

The log should show like below, ReconnectTime should be set to 1 (vhost_user_reconnect_timeout_sec = 1)

level=info msg="Attaching device" Index=1 ReconnectTime=1 SocketPath=/var/run/kata-containers/vhost-user/block/sockets/vhostblk7 Type=vhost-user-blk-pci device=/var/run/kata-containers/vhost-user/block/sockets/vhostblk7 name=containerd-shim-v2 pid=2922759

Would be fixed by #9849

@markyangcc markyangcc added bug Incorrect behaviour needs-review Needs to be assessed by the team. labels Jun 14, 2024
markyangcc pushed a commit to markyangcc/kata-containers that referenced this issue Jun 14, 2024
markyangcc added a commit to markyangcc/kata-containers that referenced this issue Jun 14, 2024
@katacontainersbot katacontainersbot moved this from To do to In progress in Issue backlog Jun 14, 2024
markyangcc added a commit to markyangcc/kata-containers that referenced this issue Jun 17, 2024
markyangcc added a commit to markyangcc/kata-containers that referenced this issue Jun 18, 2024
Commit 'ca02c9f5124e' implements the vhost-user-blk reconnection functionality,
However, it has missed assigning VhostUserDeviceReconnect when new the QEMU
HypervisorConfig, resulting in VhostUserDeviceReconnect always set to default value 0.

Real change is this line, most of changes caused by go format,

return vc.HypervisorConfig{
	// ...
	VhostUserDeviceReconnect: h.VhostUserDeviceReconnect,
}, nil

Fixes: kata-containers#9848
Signed-off-by: markyangcc <mmdou3@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behaviour needs-review Needs to be assessed by the team.
Projects
Issue backlog
  
In progress
Development

Successfully merging a pull request may close this issue.

1 participant