-
Notifications
You must be signed in to change notification settings - Fork 159
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
App-shared port without DNS server is not necessarily an issue #4315
Conversation
Not having DNS servers configured (while link is OK and IP address is assigned), is not necessarily a failure for an app-shared interface. Some applications might not require DNS for external hostnames and may only use internal DNS servers to resolve the names of other apps running on the same device. However, we should still issue a warning about this potential issue. Signed-off-by: Milan Lenco <milan@zededa.com>
@OhmSpectator It seems that we have caught some panic in the PSI unit test:
https://github.com/lf-edge/eve/actions/runs/11123159400/job/30906006512?pr=4315 |
This code fails:
May it be somehow related to the changes in the PR? @christoph-zededa, do we have other unit tests for the Debug Server? It fails to start for some reason... |
@milan-zededa, could you reproduce it locally?
|
We have only https://github.com/lf-edge/eve/blob/master/pkg/pillar/agentlog/http-debug_test.go#L66 Also I would not call this a unit test ... |
Ooph... Can we automate all the steps mentioned in the comments?.. Ok, @milan-zededa, this one is also to be checked if the failure is consistent... I'll try locally as well. |
Also I see:
So the test times out ..., too. |
Only in this PR, or the master as well? |
I doubt it is in master otherwise we would have seen failed tests. |
Then, this PR somehow affected our debug server started by Pillar... |
Or the test is flaky ;-) |
I tried it locally and it ran successfully... |
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.
I restarted the tests here, and they also work fine...
✓ agentlog (24.775s)
Hm... Interesting; what would be a reason for this long server start?... @christoph-zededa, could we add a basic HttpDebug test that we can run in CI?
seems it was in this mutex here: https://github.com/lf-edge/eve/actions/runs/11123159400/job/30906006512?pr=4315#step:3:583 (agentlog_test.go:408 ) I am not sure if another test helps, your test is already testing it as well and testing that the golang http server works is already covered by their (=golang standard lib) tests enough. |
Okay, I see one case where we can get a deadlock here. I will fix it later. But it could have happened already when HttpSerrver failed to start in 10 seconds (I do not unlock the lock in this case and return). |
Also, can the lock still be locked if a signal interrupts the previous instance of the server running in a test? I'll create a ticket for that. I hate "easy go testing". |
Like f.e. SIGTERM? The mutex is only valid during runtime. |
Hm... Then I have no idea how we could deadlock there... Wanna take a look? =) |
Yeah, indeed, it was the case. The server has not started in one test, forgot to unlock the mutex, and failed the next test in deadlock. I'll fix the deadlock soon. |
#4316 is here |
Would be good to have a profile or more log messages to see what is going on. |
Weren't you able to reproduce it locally with the HttpDebug test you mentioned before? |
@milan-zededa Sorry for discussing all that time a failure in the HttpDebug test)) I'll also take a look at the code of the PR itself)) |
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.
Running the Eden tests.
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.
LGTM
Looks like tests already run and succeeded: https://github.com/lf-edge/eve/actions/runs/11134071507 |
Not having DNS servers configured (while link is OK and IP address is assigned), is not necessarily a failure for an app-shared interface. Some applications might not require DNS for external hostnames and may only use internal DNS servers to resolve the names of other apps running on the same device. However, we should still issue a warning about this potential issue.