Commit baa37e3
committed
[yugabyte#4851] Default to IPv4 addresses only for resolution and local addr selection
Summary:
In yugabyte@5a88e2f, a getaddrinfo call was changed to use AF_UNSPEC instead of AF_INET to return both IPv4 and IPv6 results for resolution. This means that localhost now resolves to both 127.0.0.1 and [::1] on most modern systems that have these entries in /etc/hosts.
However, in https://github.com/yugabyte/yugabyte-db/runs/787021393, it seems there is a github workflow host that resolves localhost to [::1] but has an error binding to [::1].
The issue doesn't happen on a vanilla Ubuntu 18.04 GCP host with a similar IPv6 entry added for localhost. I'm not sure how many hosts exist with this issue but to be safe, I am restricting DNS resolution and local address seletion to only use IPv4 hosts. This behavior should be roughly similar to earlier.
Test Plan: Ran this fix through the workflow as part of a PR and verified that the create snapshot failure no longer occurs.
Reviewers: bogdan, sergei, mikhail
Reviewed By: mikhail
Subscribers: ybase
Differential Revision: https://phabricator.dev.yugabyte.com/D87341 parent 3cc749a commit baa37e3
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
| 763 | + | |
| 764 | + | |
763 | 765 | | |
764 | 766 | | |
765 | 767 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments