:: Re: [DNG] Beowulf Beta is here!
トップ ページ
このメッセージを削除
このメッセージに返信
著者: aitor
日付:  
To: dng
題目: Re: [DNG] Beowulf Beta is here!
Hi,

On 9/4/20 18:16, Didier Kryn wrote:
> Le 09/04/2020 à 16:13, dal a écrit :
>> Hello and thanks for Beowulf.
>>
>> An issue:
>>
>> it looks like
>>
>>    devuan_beowulf_3.0.0_beta_amd64_netinstall.iso
>>    and the base system installable from it
>>
>> do not contain the ifupdown package (nor other networking utilities
>> besides busybox ip?).
>>
>> The resulting base installation remains offline.
>> This is a more limited definition of a "base system" than it used to
>> be, most probably unintentionally.
>
>     I remember this was also the case in a previous version, wether
> Jessie or Ascii. Obviously this isn't an issue when upgrading. I also
> remind you that the startup delay caused by the timed-out activation
> of the Ethernet interface (when not plugged in) is still there with
> the default interfaces file. The solution is to remove the clause
> "allow-hotplug eth0" and install ifupdown or the equivalent I have
> forgotten the name of.
>
>     Didier



The origin of the startup delay is in the lock_interface() function of
ifupdown in the main.c file:

https://github.com/wido/ifupdown/blob/master/main.c

between the lines nº196-209, surely because ifupdown is trying to lock
both wired and wireless devices
at the same time that some dhcp client (isc-dhcp-client, dhcpcd5,
udhcpc...) is trying to connect (in vain) to some of them,
being these resources busy. The C function used during the lock attempts
is *fcntl* which uses the following macros:


Macro: /int/ *F_SETLK*

        whose error conditions are defined by EACCES in GNU/Linux and
EAGAIN in GNU/Hurd.


Macro: /int/ *F_SETLKW  (= F_SETLK + Wait)
*

    which causes the process to block (or wait) until the request can be
    specified (line nº199 in main.c).



Read here for more details:

https://www.gnu.org/software/libc/manual/html_node/File-Locks.html

I replaced this code by an unique line:

        int flags = fcntl(fileno(lock_fp), F_SETLK, &lock);

and the delay disappears (the same effect than removing "allow-hotplug"
from /etc/network/interfaces.

As a final remark, the "auto <device>" stanza seems to be deprecated,
but some people still use it. In the case of

having both defined, that is:

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

the clause "allow-hotplug" has priority over "auto"; so, using both at
the same time makes no sense.

You can download the patched packages from here:

http://packages.gnuinos.org/?dir=gnuinos/pool/main/i/ifupdown

Cheers,

Aitor.