Skip to content
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

Reverse name lookup is broken for current hostname in ubuntu VMs #3185

Closed
3 of 7 tasks
lhotari opened this issue Apr 14, 2021 · 18 comments · Fixed by apache/avro#1199
Closed
3 of 7 tasks

Reverse name lookup is broken for current hostname in ubuntu VMs #3185

lhotari opened this issue Apr 14, 2021 · 18 comments · Fixed by apache/avro#1199
Assignees
Labels
Area: Common Tools awaiting-deployment Code complete; awaiting deployment and/or deployment in progress external investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu

Comments

@lhotari
Copy link

lhotari commented Apr 14, 2021

Description

Reverse name lookup is broken for the current hostname. This leads to odd issues. Here are some reports from GitHub Community:

This is a problem report in apache/pulsar: apache/pulsar#10232
and workaround in apache/pulsar apache/pulsar#10233

I have suggested this general workaround to the problem:

- name: Add the current IP address, long hostname and short hostname record to /etc/hosts file
  run: |
     echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts

Question, Bug, or Feature?: Bug

Virtual environments affected

  • Ubuntu 16.04
  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11.0
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior

hostname -i, nslookup $(hostname -s) and nslookup $(hostname -l) should return the IP address of the current hostname.

Actual behavior

hostname -i, nslookup $(hostname -s) or nslookup $(hostname -l) returns an IP address that changes and the IP address doesn't belong to the current host.

Repro steps

Add this command to some action and run it ip a; while [ 1 ]; do nslookup $(hostname); sleep 3; done

Example output

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:0d:3a:11:ff:4c brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.35/16 brd 10.1.255.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::20d:3aff:fe11:ff4c/64 scope link 
       valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:b1:57:12:f2 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever

Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   fv-az132-427.w5jmtgevnbgefpdoz44oxoejwc.bx.internal.cloudapp.net
Address: 10.1.1.83

Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   fv-az132-427.w5jmtgevnbgefpdoz44oxoejwc.bx.internal.cloudapp.net
Address: 10.1.1.83

Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   fv-az132-427.w5jmtgevnbgefpdoz44oxoejwc.bx.internal.cloudapp.net
Address: 10.1.1.83

Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   fv-az132-427.w5jmtgevnbgefpdoz44oxoejwc.bx.internal.cloudapp.net
Address: 10.1.1.83

Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   fv-az132-427.w5jmtgevnbgefpdoz44oxoejwc.bx.internal.cloudapp.net
Address: 10.1.0.37

Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   fv-az132-427.w5jmtgevnbgefpdoz44oxoejwc.bx.internal.cloudapp.net
Address: 10.1.0.37

Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   fv-az132-427.w5jmtgevnbgefpdoz44oxoejwc.bx.internal.cloudapp.net
Address: 10.1.0.37

Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   fv-az132-427.w5jmtgevnbgefpdoz44oxoejwc.bx.internal.cloudapp.net
Address: 10.1.0.37

In the above case, the reverse lookup returns addresses 10.1.1.83 and 10.1.0.37 which aren't the ip addresses of the current host. The address of eth0 is 10.1.1.35 .

@github-actions github-actions bot added the investigate Collect additional information, like space on disk, other tool incompatibilities etc. label Apr 14, 2021
benel added a commit to Hypertopic/Porphyry that referenced this issue Apr 14, 2021
butuzov added a commit to butuzov/deadlinks that referenced this issue Apr 15, 2021
butuzov added a commit to butuzov/deadlinks that referenced this issue Apr 15, 2021
@Darleev
Copy link
Contributor

Darleev commented Apr 15, 2021

Hello @lhotari,
Thank you for the detailed report.
We are investigating the issue.

@dsame dsame self-assigned this Apr 15, 2021
violetagg added a commit to reactor/reactor-netty that referenced this issue Apr 15, 2021
violetagg added a commit to reactor/reactor-netty that referenced this issue Apr 15, 2021
aurelien45100 pushed a commit to aurelien45100/Porphyry that referenced this issue Apr 15, 2021
PROCESS: Continuous integration results should be predictable.

Workaround by @lhotari for the following GitHub Action issue:
actions/runner-images#3185
violetagg added a commit to reactor/reactor-netty that referenced this issue Apr 15, 2021
… GitHub Actions

Sporadic failures are observed on GitHub Actions when running on Ubuntu 20.04
Related to actions/runner-images#3185
violetagg added a commit to reactor/reactor-netty that referenced this issue Apr 15, 2021
… GitHub Actions (#1605)

Sporadic failures are observed on GitHub Actions when running on Ubuntu 20.04/18.04
Related to actions/runner-images#3185
vainyksi pushed a commit to vainyksi/lighty-core that referenced this issue Apr 20, 2021
Temporary fix until GitHub fix issue on their environment
 actions/runner-images#3185

Signed-off-by: Michal Banik <michal.banik@pantheon.tech>
vainyksi pushed a commit to vainyksi/lighty-core that referenced this issue Apr 21, 2021
Temporary fix until GitHub fix issue on their environment
 actions/runner-images#3185

Signed-off-by: Michal Banik <michal.banik@pantheon.tech>
@iemejia
Copy link
Contributor

iemejia commented Apr 22, 2021

Can somebody here please confirm when this is done so we can remove the workarounds?

@miketimofeev
Copy link
Contributor

@iemejia it should be finished by now

vsoch added a commit to vsoch/spack that referenced this issue Apr 22, 2021
The issue is reported to be resolved, e.g., see
actions/runner-images#3185 and
I want to test if it indeed is.

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
@iemejia
Copy link
Contributor

iemejia commented Apr 22, 2021

Thanks @miketimofeev it works like a charm now!

@miketimofeev
Copy link
Contributor

@lhotari I'm going to close the issue since the root cause is fixed. Please feel free to contact us if you have any concerns.
Thank you!

@lhotari
Copy link
Author

lhotari commented Apr 26, 2021

@lhotari I'm going to close the issue since the root cause is fixed. Please feel free to contact us if you have any concerns.
Thank you!

@miketimofeev Sounds good. Thanks for resolving the issue.

benel added a commit to Hypertopic/Porphyry that referenced this issue May 26, 2021
netanel246 added a commit to apache/sedona that referenced this issue Jun 2, 2021
CI's bug is from Github Actions:
actions/runner-images#3185
netanel246 added a commit to apache/sedona that referenced this issue Jun 6, 2021
CI's bug is from Github Actions:
actions/runner-images#3185
netanel246 added a commit to apache/sedona that referenced this issue Jul 21, 2021
CI's bug is from Github Actions:
actions/runner-images#3185
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Common Tools awaiting-deployment Code complete; awaiting deployment and/or deployment in progress external investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu
Projects
None yet
Development

Successfully merging a pull request may close this issue.

12 participants