Tom Hughes wrote:
> On 23/02/18 14:33, Paul Howarth wrote:
>> On Thu, 22 Feb 2018 18:49:02 +0100
>> Marek Polacek <> wrote:
>>>      proftpd: timeouts in tests, but in koji it's fine
>> I get this too. If I build with mock --old-chroot then it works fine.
> So the obvious difference is that mock with --old-chroot has networking
> enabled while the default (ie --new-chroot) does not.
> Does --enable-network also make it work?
> That doesn't explain koji though, as that has networking disabled.

I don't know if this is the same issue, but I noticed that
in local mock builds of git, some tests were very slow.  The
tests that were slow were suffering from socket timeouts
while making calls to getaddrinfo (to get the local
hostname, for determining the default git user identity).

I added --private-network to the nspawn_args in the mock
config which eliminated the 5 second timeouts for each of
these calls.

I made a comment to remind myself about it later:

# NOTE (tmz): This should still be the default, I think.  Without it, network
# calls timeout rather than fail quickly.  The typical default socket timeout is
# 5 seconds.  A simple call like 'git var GIT_AUTHOR_IDENT' saw 4 socket
# timeouts and takes 20 seconds to return.  With this option, it takes
# milliseconds.
# See where this was
# partially dealt with.  Unfortunately, the solution there sets a default route
# to but copies /etc/resolv.conf from the host system -- regardless of
# the use_host_resolv setting because systemd-nspawn overrides mock and copies
# the system /etc/resolf.conf to the container.  There seems to be no option
# other than --private-network to avoid this.

I haven't had time to look at it further to see if there are
any patches worth submitting to improve the situation (in
mock and/or systemd-nspawn).

Men have become the tools of their tools.
    -- Henry David Thoreau (1817-1862)

Attachment: signature.asc
Description: PGP signature

devel mailing list --
To unsubscribe send an email to

Reply via email to