-
Notifications
You must be signed in to change notification settings - Fork 46
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
LogDNA agent is failling with error ERROR logdna_agent::_main: bad request, check configuration: 400 Bad Request #617
Comments
Thanks for reporting @okarasov-sift, the error indicates a 400 response from our ingestion API so it's a bit puzzling why this happens on a node pool with attached GPU's and even more puzzling that the suggested workarounds work. We can extract a bit more information about the bad request by setting the agent to log in debug mode. Can you set following environment variable for the container and share the resulting logs:
|
@jakedipity , thank you for you response. I found in log the following
|
Looks like root cause is /etc/hostname file. Our GKE clusters use GCP GKE use Container-Optimized OS version 105. I checked a node where LogDNA agent works, there is /etc/hostname but it is folder. Because, there was no hostname file at all, but during logdna agent pod startup it create volume from my understanding. Not clear how to fix it. |
@jakedipity, if /etc/hostname (/etc/logdna-hostname) is absent, logdna agent will take /etc/hostname (inside pod). it's not correct logic but it will not crash looping. The problem is that /etc/hostname file (/etc/logdna-hostname) is present but it's empty. I think logdna should check if /etc/logdna-hostname is empty, take value from /etc/hostname. Now it checks only if file exists or not. logdna-agent-v2/common/config/src/lib.rs Line 459 in e58e05f
|
There's some downstream side effects for the node's We can definitely make the paths check more robust and keep falling back until it finds a non-empty value, but it's worth also understanding why the node's |
Additionally, it may be more appropriate to fetch the node name directly from Kubernetes. We already populate the node name into an environment variable here, but such a change would be breaking. |
@jakedipity , I see that you merged commit related to /etc/hostname. Does it help to resolve the issue? When are you going to do official release? |
@okarasov-sift That commit doesn't alter the previous behavior of accepting an empty hostname as valid. This issue is minor and we are currently in the process of beta testing the upcoming 3.10.0 release so this is quite low on our priority list. You're welcome to make the change yourself. The logic isn't difficult it just requires an adequate test case for the new behavior - the recent commit should make testing the function straightforward. Additionally I think we still should have a discussion about where is an appropriate source for the hostname (which is used as the cluster name downstream) in container contexts. |
Problem
Environment
The text was updated successfully, but these errors were encountered: