Bug 2270507 - IP -> name resolution issues delay VNC startup by 2 minutes
Summary: IP -> name resolution issues delay VNC startup by 2 minutes
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: anaconda-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-03-20 16:00 UTC by Martin Kolman
Modified: 2025-02-26 13:00 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Martin Kolman 2024-03-20 16:00:19 UTC
I've noticed that trying to enable VNC access to the installation image results in 2 minute delay during VNC startup - according to the log messages, the VNC startup code gets stuck on something for 2 minutes, before completing startup.

When I looked at the code and added some debugging outputs, it tuns out that his line is at fault:

hinfo = socket.gethostbyaddr(self.ip)

This is used so that Anaconda can display not only an IP address for the user to connect to, but also a hostname & this call tries to translate the machine IP address to the hostname.

Apparently for some reason, this simply gets consistently stuck on some VMs (in my case default Virt Manager VM config running on the root mode KVM) with some Fedora versions. I've tried:

Fedora 35 - Fedora 39 : no 2 minute delay
Fedora 40 & current Fedora Rawhide : 2 minute delay
RHEL 8 - 10 : no 2 minute delay

I had a theory related to systemd-resolved causing this, as it was introduced in Fedora 36, but my testing does not confirm that, with Fedora 36 - 39 apparently not being affected.

Also, the delay is not just only annoying, but might be long enough to result in other things, such as GUI environment startup or some watchdog code timing out. 

NOTE: This will affect also any VNC replacement (such as for example: https://github.com/rhinstaller/anaconda/pull/5498), as long as we will want to show also the hostname, not just the IP address.

Reproducible: Always

Steps to Reproduce:
1. create a VM in Virt Manager with default settings
2. boot Fedora 40 or recent Rawhide, using this boot option: "inst.vnc"
3. observe that VNC start stalls for 2 minutes until the address you can connect to is written out

Alternatively you can also switch to TTY2 on the affected VM (TTY2 has root shell) and do:

python3
import socket
socket.gethostbyaddr(<VM IP>)

The VM IP can be found via the  "ip a" commend & its the same IP Anaconda writes out after the 2 minute delay.

If the gethostbyaddr() waits for 2 minutes beofre returning a result, you are affected.
Actual Results:  
There is a consistent 2 minute delay translating an IP address to hostname.

Expected Results:  
There is not a consistent 2 minute delay translating an IP address to hostname.

Comment 1 Aoife Moloney 2025-02-26 13:00:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.


Note You need to log in before you can comment on or make changes to this bug.