Bug 1798005 - wrong resolv.conf in toolbox
Summary: wrong resolv.conf in toolbox
Keywords:
Status: CLOSED DUPLICATE of bug 1785244
Alias: None
Product: Fedora
Classification: Fedora
Component: toolbox
Version: 31
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Debarshi Ray
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-04 11:45 UTC by Luca Giuzzi
Modified: 2020-08-30 21:13 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-08-30 21:13:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Luca Giuzzi 2020-02-04 11:45:30 UTC
Description of problem:

If I create an environment with 
toolbox create
toolbox enter

the file /etc/resolv.conf ends up being a symbolic link to 
/run/host/etc/resolv.conf

however 
/run/host/etc/resolv.conf 
is a symbolic link to 
/var/run/NetworkManager/resolv.conf

which is not exported to the container.

Version-Release number of selected component (if applicable):


How reproducible:
always


Steps to Reproduce:
1. toolbox create
2. toolbox enter
3. ping www.google.com

Actual results:
the dns is not set

Expected results:
the dns is set 

Additional info:

Comment 1 Ondřej Míchal 2020-05-27 19:34:57 UTC
Yes, this is a known problem (https://github.com/containers/toolbox/issues/187). Toolbox currently has no mechanism for following symlinks when it links files (there is an ongoing work to fix that: https://github.com/containers/toolbox/pull/460).

But for now, there is a solution to fix this manually. /var/run/NetworkManager/resolv.conf is in fact available in the container. You should find it in /run/host/run/NetworkManager/resolv.conf.

Steps to fix this manually:
1. rm /etc/resolv.conf (delete the faulty link)
2. ln -s /run/host/run/NetworkManager/resolv.conf /etc/resolv.conf

Comment 2 Debarshi Ray 2020-08-30 21:13:21 UTC

*** This bug has been marked as a duplicate of bug 1785244 ***


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