On Sat, Nov 02, 2024 at 02:36:36PM +0200, Martin-Éric Racine wrote:
> la 2. marrask. 2024 klo 14.32 Athanasius (deb...@miggy.org) kirjoitti:
> >
> > On Sat, Nov 02, 2024 at 02:22:54PM +0200, Martin-Éric Racine wrote:
> > > Btw, I assume that you are the one who filed
> > > (https://github.com/NetworkConfiguration/dhcpcd/issues/100) upstream?
> >
> >   Yes.
> 
> Upstream has marked the issue as fixed.
> 
> Anyhow, as I stated in my previous reply, if dhcpcd is used as an
> ifupdown backend via /etc/network/interfaces (i.e. only
> bin:dhcpcd-base is installed, not bin:dhcpcd) , it should run the
> ifup-d scripts the same way as dhclient did.

  OK, so I decided to check that on my system.

12:23:32 0$ dpkg -l dhcpc\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version            Architecture Description
+++-==============-==================-============-============================>
un  dhcpcd         <none>             <none>       (no description available)
ii  dhcpcd-base    1:10.1.0-1~bpo12+1 amd64        DHCPv4 and DHCPv6 dual-stack>
un  dhcpcd5        <none>             <none>       (no description available)

root@emilia:/etc/network;
12:24:57 0$ cat interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback
12:25:20 0$ grep -Ev '^[#]' interfaces.d/lan0 
auto lan0
iface lan0 inet dhcp


iface lan0 inet6 dhcp

  This results in networking not actually coming up, but it's not
through lack of trying.  From `journalctl -a --unit=networking.service`:

-- Boot ad94fd7e06874b17b74829f877be035d --
Nov 04 12:19:02 emilia systemd[1]: Starting networking.service - Raise network 
interfaces...
Nov 04 12:19:02 emilia ifup[1335]: dhcpcd-10.1.0 starting
Nov 04 12:19:02 emilia dhcpcd[1335]: dhcpcd-10.1.0 starting
Nov 04 12:19:02 emilia ifup[1338]: DUID 
00:04:db:59:a1:a8:24:b6:00:00:00:00:00:00:00:00:00:00
Nov 04 12:19:02 emilia dhcpcd[1338]: DUID 
00:04:db:59:a1:a8:24:b6:00:00:00:00:00:00:00:00:00:00
Nov 04 12:19:03 emilia ifup[1338]: lan0: waiting for carrier
Nov 04 12:19:03 emilia dhcpcd[1338]: lan0: waiting for carrier
Nov 04 12:19:06 emilia ifup[1338]: lan0: carrier acquired
Nov 04 12:19:06 emilia dhcpcd[1338]: lan0: carrier acquired
Nov 04 12:19:06 emilia ifup[1338]: lan0: IAID 59:db:b6:24
Nov 04 12:19:06 emilia ifup[1338]: lan0: adding address 
fe80::aaa1:59ff:fedb:b624
Nov 04 12:19:06 emilia dhcpcd[1338]: lan0: IAID 59:db:b6:24
Nov 04 12:19:06 emilia dhcpcd[1338]: lan0: adding address 
fe80::aaa1:59ff:fedb:b624
Nov 04 12:19:07 emilia ifup[1338]: lan0: rebinding lease of 192.168.1.122
Nov 04 12:19:07 emilia dhcpcd[1338]: lan0: rebinding lease of 192.168.1.122
Nov 04 12:19:07 emilia ifup[1338]: lan0: soliciting an IPv6 router
Nov 04 12:19:07 emilia dhcpcd[1338]: lan0: soliciting an IPv6 router
Nov 04 12:19:10 emilia ifup[1338]: lan0: probing address 192.168.1.122/24
Nov 04 12:19:10 emilia dhcpcd[1338]: lan0: probing address 192.168.1.122/24
Nov 04 12:19:10 emilia ifup[1338]: lan0: Router Advertisement from 
fe80::20a:cdff:fe42:975f
Nov 04 12:19:10 emilia dhcpcd[1338]: lan0: Router Advertisement from 
fe80::20a:cdff:fe42:975f
Nov 04 12:19:10 emilia ifup[1338]: lan0: no global addresses for default route
Nov 04 12:19:10 emilia dhcpcd[1338]: lan0: no global addresses for default route
Nov 04 12:19:10 emilia ifup[1338]: lan0: adding route to 
2001:4d48:ad5d:de00::/60
Nov 04 12:19:10 emilia dhcpcd[1338]: lan0: adding route to 
2001:4d48:ad5d:de00::/60
Nov 04 12:19:10 emilia ifup[1338]: lan0: adding route to 
2001:4d48:ad5d:de80::/60
Nov 04 12:19:10 emilia dhcpcd[1338]: lan0: adding route to 
2001:4d48:ad5d:de80::/60
Nov 04 12:19:10 emilia dhcpcd[1338]: lan0: adding route to 
2001:4d48:ad5d:de90::/64
Nov 04 12:19:10 emilia ifup[1338]: lan0: adding route to 
2001:4d48:ad5d:de90::/64
Nov 04 12:19:10 emilia ifup[1338]: lan0: confirming prior DHCPv6 lease
Nov 04 12:19:10 emilia dhcpcd[1338]: lan0: confirming prior DHCPv6 lease
Nov 04 12:19:11 emilia ifup[1338]: lan0: REPLY6 received from 
fe80::20a:cdff:fe42:975f
Nov 04 12:19:11 emilia dhcpcd[1338]: lan0: REPLY6 received from 
fe80::20a:cdff:fe42:975f
Nov 04 12:19:11 emilia ifup[1338]: lan0: adding address 
2001:4d48:ad5d:de01::1/128
Nov 04 12:19:11 emilia ifup[1338]: lan0: renew in 475, rebind in 1475, expire 
in 3475 seconds
Nov 04 12:19:11 emilia ifup[1338]: lan0: adding default route via 
fe80::20a:cdff:fe42:975f
Nov 04 12:19:11 emilia dhcpcd[1338]: lan0: adding address 
2001:4d48:ad5d:de01::1/128
Nov 04 12:19:11 emilia dhcpcd[1338]: lan0: renew in 475, rebind in 1475, expire 
in 3475 seconds
Nov 04 12:19:11 emilia dhcpcd[1338]: lan0: adding default route via 
fe80::20a:cdff:fe42:975f
Nov 04 12:19:13 emilia ifup[4955]: No DHCPv6 client software found!
Nov 04 12:19:13 emilia ifup[1290]: ifup: failed to bring up lan0
Nov 04 12:19:13 emilia systemd[1]: networking.service: Main process exited, 
code=exited, status=1/FAILURE
Nov 04 12:19:13 emilia dhcpcd[1338]: received SIGTERM, stopping
Nov 04 12:19:13 emilia dhcpcd[1338]: lan0: removing interface
Nov 04 12:19:13 emilia dhcpcd[1338]: lan0: deleting address 
2001:4d48:ad5d:de01::1/128
Nov 04 12:19:13 emilia dhcpcd[1338]: lan0: deleting default route via 
fe80::20a:cdff:fe42:975f
Nov 04 12:19:13 emilia dhcpcd[1338]: lan0: deleting route to 
2001:4d48:ad5d:de90::/64
Nov 04 12:19:13 emilia dhcpcd[1338]: lan0: deleting route to 
2001:4d48:ad5d:de80::/60
Nov 04 12:19:13 emilia dhcpcd[1338]: lan0: deleting route to 
2001:4d48:ad5d:de00::/60
Nov 04 12:19:13 emilia dhcpcd[1338]: lan0: deleting address 
fe80::aaa1:59ff:fedb:b624
Nov 04 12:19:14 emilia systemd[1]: networking.service: Failed with result 
'exit-code'.
Nov 04 12:19:14 emilia systemd[1]: Failed to start networking.service - Raise 
network interfaces.

So, it's all *working*, but then ifup decides "No DHCPv6 client software
found!" and rips it all down again ?  This, apparently, is because
`iface lan0 inet6 dhcp` is an error ?  Using only `iface lan0 inet dhcp`
*will* also bring up IPv6 via DHCPv6, because that's how I have
/etc/dhcpcd.conf set up.
  So, now it will boot and bring up both IPv4 and IPv6 via ifup
invocation of dhcpcd, good.

I also added:

echo "$(date --iso-8601=second) - $0 - Running ..." >> /tmp/mountnfs.log

before any other code in /etc/network/if-up.d/mountnfs, and in this case
it *is* getting invoked, but that's no use if I end up with no
addresses/routes anyway.

  However, I am *still not* getting all my NFS mounts.  I *do* get my
/home/users one, but I suspect that is something else systemd is doing.
I am *not* getting the other (marked `auto`, not `noauto`) mount:

192.168.1.1:/mnt/tuesday/data0  /mnt/tuesday/data0      nfs 
defaults,soft,intr,timeo=50,retrans=6,fg,nfsvers=3,nosuid,nodev,nofail,auto 0 0

12:37:19 0$ mount | grep nfs
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
192.168.1.1:/home/users on /home/users type nfs 
(rw,nosuid,nodev,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,soft,proto=tcp,timeo=50,retrans=6,sec=sys,mountaddr=192.168.1.1,mountvers=3,mountport=2050,mountproto=udp,local_lock=none,addr=192.168.1.1)

  I'll see about instrumenting if-up.d/mountnfs some more to see if can
ascertain *why* it's not working.

-- 
- Athanasius (he/him) = Athanasius(at)miggy.org / https://miggy.org/
                  GPG/PGP Key: https://miggy.org/gpg-key
           "And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence." Paula Cole - ME

Reply via email to