-
Notifications
You must be signed in to change notification settings - Fork 339
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
fix(*) traffic logging to tcp backends #1394
Conversation
This reverts commit 2bec835. # Conflicts: # app/kuma-dp/pkg/dataplane/accesslogs/server.go Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
pkg/xds/bootstrap/generator.go
Outdated
@@ -183,7 +183,7 @@ func (b *bootstrapGenerator) generateFor(proxyId core_xds.ProxyId, dataplane *co | |||
} | |||
certBytes = base64.StdEncoding.EncodeToString(cert) | |||
} | |||
accessLogPipe := fmt.Sprintf("/tmp/kuma-access-logs-%s-%s.sock", request.Name, request.Mesh) | |||
accessLogPipe := fmt.Sprintf("/tmp/%s-%s.sock", request.Name, request.Mesh) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's better to create a function like:
func AccessLogPipeName(name, mesh string) string {
return fmt.Sprintf("/tmp/%s-%s.sock", name, mesh)
}
and use it from both places? That'd allow avoiding bugs like this one, what do you think?
IMHO this does not solve the initial problem. The problem was that if the name has more than 108 characters, it will fail. Even with getting rid of the On top of that, I think it makes sense to mark this file that it is kuma access log socket, otherwise someone can just delete it. |
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
Summary
#894 actually broke TrafficLogs with TCP logger. It actually created a discrepancy in the naming of the UNIX socket between
kuma-dp
and the bootstrap generator inkuma-cp
. In effect, Envoy was not able to find the GRPC logging service as provided bykuma-dp
and the logs are never sent to the TCP logger.Revert it and shorten the UNIX socket name by removing the not needed prefix
kuma-access-logs-
.Issues resolved
Fix #853 (again)
Documentation