containers / gvisor-tap-vsock

A new network stack based on gVisor
Apache License 2.0
269 stars 50 forks source link

Revisit log level for errors in gvisor-tap-vsock #392

Closed balajiv113 closed 1 month ago

balajiv113 commented 2 months ago

Currently we are using error log for places like below,

https://github.com/containers/gvisor-tap-vsock/blob/main/pkg/services/forwarder/tcp.go#L45

Even though we get this error, there is no actual impact in the working due to this. Can we move such errors as debug. This way we will reduce the noise in upstream services when integrated.

Related ticket in Lima - https://github.com/lima-vm/lima/issues/1160

balajiv113 commented 2 months ago

If we are okay in doing it, am happy to raise a PR for the same.

cfergeau commented 2 months ago

Do you know when this error occurs? When a port on the host is forwarded to the VM, but nothing listen on this port in the VM? Looking at this specific error, I wonder if we should be doing this when it happens:

        ep, tcpErr := r.CreateEndpoint(&wq)
        if tcpErr != nil {
            log.Errorf("r.CreateEndpoint() = %v", tcpErr)
            r.Complete(true)
            return
        }
        r.Complete(false)

A PR making the warning less visible is welcome.

AkihiroSuda commented 1 month ago

PR:

I didn't touch the r.Complete in this PR, to avoid causing regressions right before the new release