Actions
Bug #21134
openFix proxy error logging in controller's container log handler
Story points:
0.5
Description
Currently, when controller gets a non-HTTP error while trying to proxy a request to keep-web, the error gets logged using stdlib log.Print()
instead of structured logs:
{"ClusterID":"2xpu4","PID":22503,"RequestID":"req-1bqnt5n2ozwpcscdjc94","level":"info","msg":"request","remoteAddr":"127.0.0.1:38144","reqBytes":0,"reqForwardedFor":"XXX","reqHost":"2xpu4.arvadosapi.com","reqMethod":"PROPFIND","reqPath":"arvados/v1/container_requests/XXX/log/XXX","reqQuery":"","time":"2023-10-20T14:56:54.866512957Z"} 2023/10/20 14:56:54 http: proxy error: dial tcp 127.0.0.1:9002: connect: connection refused {"ClusterID":"2xpu4","PID":22503,"RequestID":"req-1bqnt5n2ozwpcscdjc94","level":"info","msg":"response","priority":1,"remoteAddr":"127.0.0.1:38144","reqBytes":0,"reqForwardedFor":"XXX","reqHost":"2xpu4.arvadosapi.com","reqMethod":"PROPFIND","reqPath":"arvados/v1/container_requests/XXX/log/XXX","reqQuery":"","respBody":"","respBytes":0,"respStatus":"Bad Gateway","respStatusCode":502,"time":"2023-10-20T14:56:54.881886673Z","timeToStatus":0.015358,"timeTotal":0.015365,"timeWriteBody":0.000007,"tokenUUIDs":["XXX"]}
The error should be returned to the client in the 502 response body and, ideally, in a field in the "response" log entry.
No data to display
Actions