Paul Howarth wrote:
On Fri, 23 Feb 2018 15:04:44 +0000
Tom Hughes <tom(a)compton.nu> wrote:
> On 23/02/18 14:33, Paul Howarth wrote:
>> On Thu, 22 Feb 2018 18:49:02 +0100
>> Marek Polacek <polacek(a)redhat.com> 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?
Yes, it does.
> That doesn't explain koji though, as that has networking disabled.
You likely know, koji doesn't run the current mock. It's
got mock-1.3.4 which used the old-style chroot rather than
systemd-nspawn. I'm not sure how exactly networking is
disabled on the builders.
Indeed. It looks like it's the combination of using nspawn and
no
network that breaks it.
A fedpkg mockbuild of proftpd works with nspawn if you add
the '--private-network' option in site-defaults.cfg, i.e.:
config_opts['nspawn_args'] = ['--private-network']
Without that option the way networking is disbled can cause
problems like this.
If you want to use the old-style chroot with fedpkg
mockbuild, it can be set in site-defaults.cfg via:
config_opts['use_nspawn'] = False
Working out the issues with mock's use of systemd-nspawn
would be ideal. I left off looking at it by setting the
'--private-network' option, but I didn't feel that I had
enough evidence that was the only/best solution to propose
it as a patch (particularly because it was used in a
previous iteration of the changes in the issue below).
As I mentioned in a previous reply, more discussion of this
can be found in mock issue #113:
https://github.com/rpm-software-management/mock/issues/113
I remember thinking part of the issue seemed to be that the
solution currently implemented in mock sets the default
route to 127.0.0.1 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/resolv.conf to the container.
If someone has some time to poke around with this and
perhaps open a new mock issue, that would be great.
--
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wisdom has two parts: (1) having a lot to say and (2) not saying it.