How to make DNS resolving fail early in mock?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, since our Koji builds have disabled internet access, I want to do the same, so I have more Koji consistent builds.

I have the following in /etc/mock/site-defaults.cfg:

    config_opts['use_host_resolv'] = True  # or False, no difference
    config_opts['rpmbuild_networking'] = False

The internet doesn't work (desired), but has large timeouts (undesired).

This is especially tedious when building Python packages that use intershpinx and they try to fetch stuff from the internet during build (it fails, but that's OK). For each such request, the build is prolonged for ~1 minute. I have Python packages that try to download (and fail) 10+ intershpinx inventories during build. That's 10+ minutes waiting for something that'll fail anyway. I've been adding hacks to sphinx calls to make intersphinx timeout sooner, but it's unnecessary clutter in the spec.

So I decided to test this. I've added the following to the spec:

    time curl http://example.com/

Here are the times:

 * my mock: real  0m56.595s Could not resolve host
 * Koji:    real  0m0.030s  Could not resolve host

This seems to be just about resolving hosts. See with IP address:

    time curl http://1.1.1.1/

 * my mock: real  2m10.953s Connection timed out
 * Koji:    real  2m11.337s Connection timed out


Is there a trick to make resolving fail early?

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx/message/MBFS765SLJISUVQ5UWZ2HJNJU4IDTN4K/




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux