Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
protocols: client: Add timeout for hybrid vsock handshake
When the client tries to connect sometimes a race condition could happen when the between bind and listen calls in the agent vsock side. This will block the hypervisor wanting for a response and as consequence the agent client where it checks for an OK response. This case needs to be handled by the guest kernel, see https://lore.kernel.org/netdev/668b0eda8823564cd604b1663dc53fbaece0cd4e.camel@intel.com/ As an extra protection make the agent client timeout if no OK response is given. The response should be quick so is OK to wait a few seconds and then timeout. This also allow to return an error from the dialler function so retry does not fallback on grpc retry making retries faster. Fixes: kata-containers#372 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
- Loading branch information