-
Notifications
You must be signed in to change notification settings - Fork 565
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
[tests] Fix issue with 127.0.1.1 IP being detected #3981
base: main
Are you sure you want to change the base?
[tests] Fix issue with 127.0.1.1 IP being detected #3981
Conversation
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
Isn't it better to change the (.. which can have its caveats as well, so I am still OK-ish with the workaround kind of fix) |
@pmoravec thanks for your input, I was looking for a quick way to solve it, but after further investigation, and looking through stuff, I think I may have found a better approach Interestingly that I get 2 different results with the following 2 different hostnames
Maybe we can check to see if it's just hostname without the domain, we can append |
5e161e5
to
9ac24e1
Compare
Running stageone tests in some environments sees the hostname of the machine to have an IP of 127.0.1.1 but the host is never set up in a way that this address is configured on the host. We check for hostname, if this returns a loopback address then we add .local to the end of the hostname, which ensures we get the address of the host. Closes: sosreport#3975 Signed-off-by: Arif Ali <[email protected]>
9ac24e1
to
7064369
Compare
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.
Really nice fix!
(maybe worth having a comment in the code explaining the "why we dont like 127.* addresses? :-o" but.. well.. git blame is enough)
Although I've tested this locally and all works where it wasn't before, need to still test on the Ubuntu servers. So, please don't merge before that. Probably do further testing next week. |
Running stageone tests in some environments sees the hostname of the machine to have an IP of 127.0.1.1 but the host is never set up in a way that this address is configured on the host. So if 127.0.1.1 is the one being detected, then ignore the test.
Closes: #3975
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines