Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1618409 - mock --enable-network doesn't set use_host_resolv=True (overriding the value set in config)
Summary: mock --enable-network doesn't set use_host_resolv=True (overriding the value ...
Keywords:
Status: CLOSED DUPLICATE of bug 1593212
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-16 14:56 UTC by Miro Hrončok
Modified: 2018-08-16 16:25 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-16 16:25:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2018-08-16 14:56:46 UTC
Description of problem:
--enable-network should, well enable network. but it doesn't enable resolv.conf.

Version-Release number of selected component:
mock-1.4.11-1.fc28.noarch


$ grep resolv /etc/mock/site-defaults.cfg
# Using --enable-network sets use_host_resolv True, overriding the value set here.
# config_opts['use_host_resolv'] = False


$ grep resolv ~/.config/mock.cfg 
# Using --enable-network sets use_host_resolv True, overriding the value set here.
config_opts['use_host_resolv'] = False

$ mock -r fedora-rawhide-x86_64 shell 
<mock-chroot> sh-4.4# cat /etc/resolv.conf 
<mock-chroot> sh-4.4# curl fedoraproject.org
curl: (6) Could not resolve host: fedoraproject.org


$ mock -r fedora-rawhide-x86_64 shell --enable-network
<mock-chroot> sh-4.4# cat /etc/resolv.conf 
<mock-chroot> sh-4.4# curl fedoraproject.org
curl: (6) Could not resolve host: fedoraproject.org

=== change the config

$ grep resolv ~/.config/mock.cfg 
# Using --enable-network sets use_host_resolv True, overriding the value set here.
config_opts['use_host_resolv'] = True

$ mock -r fedora-rawhide-x86_64 shell --enable-network
<mock-chroot> sh-4.4# cat /etc/resolv.conf 
# Generated by NetworkManager
search redhat.com Home
nameserver 10.38.5.26
nameserver 10.35.255.14
nameserver 10.0.0.138
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver fe80::1%wlp4s0
<mock-chroot> sh-4.4# curl fedoraproject.org
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   293  100   293    0     0    441      0 --:--:-- --:--:-- --:--:--   441
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
...


$ mock -r fedora-rawhide-x86_64 shell 
<mock-chroot> sh-4.4# cat /etc/resolv.conf 
# Generated by NetworkManager
search redhat.com Home
nameserver 10.38.5.26
nameserver 10.35.255.14
nameserver 10.0.0.138
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver fe80::1%wlp4s0
<mock-chroot> sh-4.4# curl fedoraproject.org
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:55 --:--:--     0curl: (6) Could not resolve host: fedoraproject.org

Comment 1 Miro Hrončok 2018-08-16 16:25:08 UTC

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


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