Bug 2258648 - fedora-toolbox:39 has a dangling /etc/resolv.conf symlink on hosts without systemd-resolved(8)
Summary: fedora-toolbox:39 has a dangling /etc/resolv.conf symlink on hosts without sy...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: toolbox
Version: 39
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Debarshi Ray
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-01-16 19:30 UTC by Scott Williams
Modified: 2024-01-21 04:21 UTC (History)
6 users (show)

Fixed In Version: toolbox-0.0.99.5-2.fc39 toolbox-0.0.99.5-1.fc38
Clone Of:
Environment:
Last Closed: 2024-01-18 01:46:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure fedora-kickstarts pull-request 1010 0 None None None 2024-01-16 23:02:54 UTC
Github containers toolbox issues 1410 0 None closed fedora-toolbox:39 has a dangling /etc/resolv.conf symlink on hosts without systemd-resolved(8) 2024-01-16 23:01:08 UTC
Github containers toolbox pull 1425 0 None Merged Fix DNS queries in images with systemd-resolved on hosts without it 2024-01-16 23:03:20 UTC

Description Scott Williams 2024-01-16 19:30:19 UTC
Is not using systemd-resolved on the host, creating a Fedora 39 toolbox environment creates a bad symlink such that no DNS resolutions are possible.  This is a regression from previous versions of Fedora+toolbox as this has worked going back to at least Fedora 36.

This is observed in Fedora 39 Workstation that was upgraded from Fedora 38.  The issue was only observed after upgrading to Fedora 39 and creating a new Fedora 39 toolbox environment.

Reproducible: Always

Steps to Reproduce:
1. Disable systemd-resolved on host (ie, use dns=default in NetworkManager conf's [main] and disable systemd-resolved service that unfortunately doesn't play well with my ISP)
2. Create fresh toolbos: `toolbox create` `toolbox enter`
3. Attempt to dnf install/search
Actual Results:  
Errors during downloading metadata for repository 'fedora':
  - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-39&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]
Error: Failed to download metadata for repo 'fedora': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-39&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]


Expected Results:  
Resolution in the container environment matches host's effective resolv.conf settings.

$ ls -l /etc/resolv.conf 
lrwxrwxrwx. 1 root root 39 Nov 27 23:50 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

is a broken symlink.

Workaround in toolbox:
sudo unlink /etc/resolv.conf
sudo vi /etc/resolv.conf (Add in nameservers manually)

Comment 1 Fedora Update System 2024-01-16 23:04:47 UTC
FEDORA-2024-1505a8df50 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2024-1505a8df50

Comment 2 Fedora Update System 2024-01-16 23:04:54 UTC
FEDORA-2024-f303015b75 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2024-f303015b75

Comment 3 Debarshi Ray 2024-01-16 23:07:57 UTC
This was reported earlier as:
https://github.com/containers/toolbox/issues/1410

The root cause is a regression in the fedora-toolbox images for Fedora >= 39, but it can also be worked around by making toolbox(1) more robust when setting up /etc/resolv.conf in the container.

The fedora-toolbox:40 image has already been fixed, and toolbox-0.0.99.5 has the workaround in place.  We will soon backport the fix to fedora-toolbox:39.

Comment 4 Fedora Update System 2024-01-18 01:46:39 UTC
FEDORA-2024-1505a8df50 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2024-01-21 04:21:48 UTC
FEDORA-2024-f303015b75 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


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