Re: Congratulations on the stable/13 release!

2021-04-30 Thread Peter Libassi


> 1 maj 2021 kl. 03:45 skrev Andrew Reilly :
> 
> In case anyone's interested: for this morning's software maintenance 
> session (at home) I upgraded my file server from FreeBSD stable/12
> to the recently released stable/13.  From source, in-place, on a
> running, on-line system.  Despite the fact that the entire ZFS
> subsystem has been replaced, which is what caused me to wait for a
> couple of weeks, the upgrade appears to have been flawless.  Not a
> single error message on boot-up.  Not a single failed service.
> Everything is working perfectly.  Zpool status told me that I should
> upgrade the pools, and did: that turned on a dozen or so new features
> that I'm sure are useful.  Total downtime about a minute or so:
> just the time it took to reboot.  I'm amazed.  Good on the FreeBSD
> developers and (especially) the release engineers!
> 
> cd /usr/src
> git switch stable/13
> make -s -j20 buildworld kernel
> mergemaster -p
> make -s installworld
> mergemaster -U
> shutdown -r now
> 
> zpool status
> zpool upgrade backup20
> zpool upgrade root
> zpool upgrade tank
> 
> Done!
> 
> Cheers,
> 
> Andrew
> 
> ___
> freebsd-stable@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org”


I will join the gratulations! I’ve also upgraded my home NAS server and my 
remote Backup server without a glitch including upgrade of ZFS and all ports. 
Everything now works as on 12.2.

freebsd-update -r 13.0-RELEASE upgrade
/usr/sbin/freebsd-update install
fix /etc/ssh/sshd_conf
shutdown -r now
freebsd-update install
pkg-static install -f pkg
pkg bootstrap -f
pkg update
pkg upgrade
freebsd-update install
shutdown -r now
zpool upgrade nas

Excellent work from the FreeBSD team!

Thanks
Peter

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Congratulations on the stable/13 release!

2021-04-30 Thread Andrew Reilly
In case anyone's interested: for this morning's software maintenance 
session (at home) I upgraded my file server from FreeBSD stable/12
to the recently released stable/13.  From source, in-place, on a
running, on-line system.  Despite the fact that the entire ZFS
subsystem has been replaced, which is what caused me to wait for a
couple of weeks, the upgrade appears to have been flawless.  Not a
single error message on boot-up.  Not a single failed service.
Everything is working perfectly.  Zpool status told me that I should
upgrade the pools, and did: that turned on a dozen or so new features
that I'm sure are useful.  Total downtime about a minute or so:
just the time it took to reboot.  I'm amazed.  Good on the FreeBSD
developers and (especially) the release engineers!

cd /usr/src
git switch stable/13
make -s -j20 buildworld kernel
mergemaster -p
make -s installworld
mergemaster -U
shutdown -r now

zpool status
zpool upgrade backup20
zpool upgrade root
zpool upgrade tank

Done!

Cheers,

Andrew

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: How to make 'named' rc script invokded earlier at boot time

2021-04-30 Thread Chris

On 2021-04-30 00:30, Yasuhiro Kimura wrote:

I installed dns/bind916 on my home server and configured it so it
worked as both authoritative and recursor. Then I added
'nameserver 127.0.0.1' to /etc/resolv.conf and everything worked fine.

But after updating OS from 12.2-RELEASE to 13.0-RELEASE I noticed
execution of some rc scripts fails at boot time because of DNS lookup
error. And I also found these scripts are executed earlier than
'named'.

I've been plagued with this for years (well, a couple anyways) on several
of my servers. As I never saw anyone else mention it. I assumed it was just
"me". ;-)
rc(8) has a mountlate. Seems to me there ought to be a "startlate" key as
well. While this won't fix the cause introduced. It might at least solve
the problem.
create an /etc/rc.conf.local and move your host/nic related things into
it followed by your "named" entry. Leaving everything else in /etc/rc.conf
This (should) source all the rc.conf.local entries ahead of the rc.conf
entries. Thereby providing name resolution before ntpdate(8)/time sync
service(s)

HTH

--Chris


Now let me use 'ntpdate' as an example.

If I run `rcorder /etc/rc.d/* /usr/local/etc/rc.d/*` on 12.2-RELEASE,
then I get following result.

--
root@rolling-vm-freebsd3[474]# uname -a
FreeBSD rolling-vm-freebsd3.home.utahime.org 12.2-RELEASE-p6 FreeBSD
12.2-RELEASE-p6 GENERIC  amd64
root@rolling-vm-freebsd3[475]# rcorder /etc/rc.d/* /usr/local/etc/rc.d/*
/etc/rc.d/growfs
/etc/rc.d/sysctl
/etc/rc.d/hostid
/etc/rc.d/zvol
/etc/rc.d/dumpon
(snip)
/etc/rc.d/static_arp
/etc/rc.d/bridge
/etc/rc.d/route6d
/etc/rc.d/NETWORKING
/etc/rc.d/mountcritremote
/etc/rc.d/devfs
/etc/rc.d/ipmon
/etc/rc.d/kdc
/etc/rc.d/mdconfig2
/etc/rc.d/newsyslog
/etc/rc.d/syslogd
/usr/local/etc/rc.d/tcsd
/usr/local/etc/rc.d/named
/etc/rc.d/watchdogd
/etc/rc.d/savecore
/etc/rc.d/archdep
/etc/rc.d/linux
/etc/rc.d/sysvipc
/etc/rc.d/SERVERS
/usr/local/etc/rc.d/tpmd
/usr/local/etc/rc.d/stunnel
/etc/rc.d/accounting
/etc/rc.d/ntpdate
/etc/rc.d/rpcbind
/etc/rc.d/nfsclient
/etc/rc.d/nisdomain
(snip)
--

As you can see, while 'named' is executed before SERVERS, 'ntpdate' is
done after it.

On the other hand I get following result on 13.0-RELEASE.

--
root@rolling-vm-freebsd2[332]# uname -a
FreeBSD rolling-vm-freebsd2.home.utahime.org 13.0-RELEASE FreeBSD 
13.0-RELEASE #0

releng/13.0-n244733-ea31abc261f: Fri Apr  9 04:24:09 UTC 2021
r...@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
root@rolling-vm-freebsd2[333]# rcorder /etc/rc.d/* /usr/local/etc/rc.d/*
/etc/rc.d/dhclient
/etc/rc.d/dumpon
/etc/rc.d/growfs
/etc/rc.d/natd
(snip)
/etc/rc.d/netwait
/etc/rc.d/blacklistd
/etc/rc.d/local_unbound
/etc/rc.d/NETWORKING
/etc/rc.d/pppoed
/etc/rc.d/kdc
/etc/rc.d/kfd
/etc/rc.d/nfsuserd
/etc/rc.d/iscsid
/etc/rc.d/ipropd_slave
/etc/rc.d/nfscbd
/etc/rc.d/iscsictl
/etc/rc.d/ipropd_master
/etc/rc.d/kadmind
/etc/rc.d/kpasswdd
/etc/rc.d/mountcritremote
/etc/rc.d/wpa_supplicant
/etc/rc.d/motd
/etc/rc.d/accounting
/etc/rc.d/cleartmp
/etc/rc.d/dmesg
/etc/rc.d/archdep
/etc/rc.d/gptboot
/etc/rc.d/hostapd
/etc/rc.d/virecover
/etc/rc.d/mdconfig2
/etc/rc.d/devfs
/etc/rc.d/os-release
/etc/rc.d/newsyslog
/etc/rc.d/linux
/etc/rc.d/syslogd
/etc/rc.d/sysvipc
/etc/rc.d/watchdogd
/etc/rc.d/savecore
/etc/rc.d/ntpdate
/etc/rc.d/localpkg
/etc/rc.d/auditd
/etc/rc.d/bsnmpd
/etc/rc.d/pwcheck
/etc/rc.d/power_profile
/etc/rc.d/rpcbind
/etc/rc.d/auditdistd
/usr/local/etc/rc.d/named
/etc/rc.d/nfsclient
/etc/rc.d/hastd
/etc/rc.d/SERVERS
/etc/rc.d/nisdomain
/usr/local/etc/rc.d/stunnel
/usr/local/etc/rc.d/tpmd
/usr/local/etc/rc.d/tcsd
(snip)
--

Now both 'named' and 'ntpdate' are executed before SERVERS. And
unfortunately the latter is earlier than the former. So it is natural
that execution of 'ntpdate' fails with DNS lookup failure.

I compared ntpdate rc script between releng/12.2 and releng/13.0 but
there is no difference.

--
yasu@rolling-vm-freebsd2[1035]% pwd
/usr/src
yasu@rolling-vm-freebsd2[1036]% git diff origin/releng/12.2 
origin/releng/13.0  --

libexec/rc/rc.d/ntpdate
yasu@rolling-vm-freebsd2[1037]%
--

And of cource there is no difference with /usr/local/etc/rc.d/named
either. So it seems evaluation of rcorder(8) is changed between
12.2-RELASE and 13.0-RELEASE.

Then is there any way to make 'named' rc script invoked earlier at
boot time on 13.0-RELEASE?

Best Regards.

---
Yasuhiro Kimura
___
freebsd-po...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@f

Re: How to make 'named' rc script invokded earlier at boot time

2021-04-30 Thread Eugene Grosbein
30.04.2021 14:30, Yasuhiro Kimura wrote:
> I installed dns/bind916 on my home server and configured it so it
> worked as both authoritative and recursor. Then I added
> 'nameserver 127.0.0.1' to /etc/resolv.conf and everything worked fine.
> 
> But after updating OS from 12.2-RELEASE to 13.0-RELEASE I noticed
> execution of some rc scripts fails at boot time because of DNS lookup
> error. And I also found these scripts are executed earlier than
> 'named'.
> 
> Now let me use 'ntpdate' as an example.

named sometimes *requires* correct time to be set before it is started,
so you should either use some IP addressess for NTP bootstrapping at boot time,
or put NTP server hostname to /etc/hosts with its IP, so it resolves before 
named fires.


___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: How to make 'named' rc script invokded earlier at boot time

2021-04-30 Thread Yasuhiro Kimura
From: b56...@oldach.net (Helge Oldach)
Subject: Re: How to make 'named' rc script invokded earlier at boot time
Date: Fri, 30 Apr 2021 11:25:03 +0200 (CEST)

> Looks like this is caused by security/trousers which has "BEFORE: named 
> hastd". This port had been touched 3 weeks ago.

You provide me very good hint!

On my home server security/trousers and emulators/tpm-emulator are
installed as dependencies of security/gnutls. They install
/usr/local/etc/rc.d/tcsd and /usr/local/etc/rc.d/tpmd respectivley.
And there is circular dependency between these 2 rc srcipts and
/usr/local/etc/rc.d/named.

--
root@eastasia[1067]# rcorder /etc/rc.d/* /usr/local/etc/rc.d/* > /dev/null
rcorder: file `/usr/local/etc/rc.d/tcsd' is before unknown provision `kerberos'
rcorder: Circular dependency on file `/usr/local/etc/rc.d/named'.
rcorder: Circular dependency on provision `fake_prov_0004': 
/usr/local/etc/rc.d/tcsd -> /usr/local/etc/rc.d/tpmd -> /etc/rc.d/SERVERS -> 
/usr/local/etc/rc.d/named -> /usr/local/etc/rc.d/tcsd.
rcorder: `/usr/local/etc/rc.d/named' was seen in circular dependencies for 1 
times.
rcorder: `/etc/rc.d/SERVERS' was seen in circular dependencies for 1 times.
rcorder: `/usr/local/etc/rc.d/tpmd' was seen in circular dependencies for 1 
times.
rcorder: `/usr/local/etc/rc.d/tcsd' was seen in circular dependencies for 1 
times.
rcorder: `/usr/local/etc/rc.d/named' was seen in circular dependencies for 1 
times.
root@eastasia[1068]#
--

If I temporally move /usr/local/etc/rc.d/tcsd to somewhere else and
add 'ntpdate' to 'BEFORE' line of /usr/local/etc/rc.d/named, then
'named' comes before 'ntpupdate' in the result of rcorder.

---
Yasuhiro Kimura
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Slow iSCSI discovery on boot halting the boot process.

2021-04-30 Thread Andrea Brancatelli via freebsd-stable
On 2021-04-30 11:12, Arrigo Marchiori via freebsd-stable wrote:

> On Fri, Apr 30, 2021 at 10:29:33AM +0200, Andrea Brancatelli via 
> freebsd-stable wrote:
> 
>> Hello,  
>> 
>> I'm having an annoying problem with FreeBSD 12.2-RELEASE-p6, iscsid,
>> geom multiparty, a Dell MD3200i and fstab. 
>> 
>> Long story short, iSCSI login/connection/whatever is slower than the
>> boot process and the machine always get stuck with "cannot find
>> /san_storage (/dev/multipath/...) please enter /bin/sh location"
> 
> Did you try putting in /boot/loader.conf:
> kern.cam.boot_delay=1
> 
> It should wait for 10 seconds before attempting to mount the root
> partition.

OK, I've put it in /boot/loader.conf, let's see if it helps. 

Unfortunately it's a production machine so I cannot reboot it now to try
it. 

Thanks for the suggestion.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: How to make 'named' rc script invokded earlier at boot time

2021-04-30 Thread Yasuhiro Kimura
From: Yasuhiro Kimura 
Subject: Re: How to make 'named' rc script invokded earlier at boot time
Date: Fri, 30 Apr 2021 17:18:26 +0900 (JST)

>> The only way I can see is modify the named rc script and add the
>> services that needs named to be started on the BEFORE line at the
>> beginning of the script. Mind you, it really needs to start after
>> syslog (unless you log directly to files and do not use syslog.)
> 
> Thanks for advice. I'll try it.

I tried it but am confused by the result.

I modified /usr/local/etc/rc.d/named on my home server as following.

--
root@eastasia[1051]# head /usr/local/etc/rc.d/named
#!/bin/sh

# PROVIDE: named
# REQUIRE: NETWORKING ldconfig syslogd
# BEFORE: SERVERS ntpdate
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable BIND:
# named_enable (bool):  Run named, the DNS server (or NO).
root@eastasia[1052]#
--

And I executed `rcorder /etc/rc.d/* /usr/local/etc/rc.d/*`. Then I got
just same result as before the modification.

So I modifed /etc/rc.d/ntpdate as following.

--
root@eastasia[1053]# head /etc/rc.d/ntpdate 
 ~
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: ntpdate
# REQUIRE: NETWORKING syslogd named
# KEYWORD: nojail

. /etc/rc.subr
root@eastasia[1054]#
--

But the result still didn't changed.

As I wrote another mail my result of `rcorder -p` is different from
that of Helge Oldach. These oddities may be related.

I'll investigate further but it may take for a while.

---
Yasuhiro Kimura
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Slow iSCSI discovery on boot halting the boot process.

2021-04-30 Thread Arrigo Marchiori via freebsd-stable
Hello,

On Fri, Apr 30, 2021 at 10:29:33AM +0200, Andrea Brancatelli via freebsd-stable 
wrote:

> Hello,  
> 
> I'm having an annoying problem with FreeBSD 12.2-RELEASE-p6, iscsid,
> geom multiparty, a Dell MD3200i and fstab. 
> 
> Long story short, iSCSI login/connection/whatever is slower than the
> boot process and the machine always get stuck with "cannot find
> /san_storage (/dev/multipath/...) please enter /bin/sh location"  

Did you try putting in /boot/loader.conf:
kern.cam.boot_delay=1

It should wait for 10 seconds before attempting to mount the root
partition.

This solves the issue for me on certain embedded systems, and when
trying to boot from cheap USB pen drives.

I hope this helps.

Best regards,
-- 
Arrigo
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Slow iSCSI discovery on boot halting the boot process.

2021-04-30 Thread Andrea Brancatelli via freebsd-stable
On 2021-04-30 10:29, Andrea Brancatelli via freebsd-stable wrote:

> Hello,  
> 
> I'm having an annoying problem with FreeBSD 12.2-RELEASE-p6, iscsid,
> geom multiparty, a Dell MD3200i and fstab.

Geom multiparty is probably the best typo/autocorrect ever. 

---

Andrea Brancatelli
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Slow iSCSI discovery on boot halting the boot process.

2021-04-30 Thread Andrea Brancatelli via freebsd-stable
Hello,  

I'm having an annoying problem with FreeBSD 12.2-RELEASE-p6, iscsid,
geom multiparty, a Dell MD3200i and fstab. 

Long story short, iSCSI login/connection/whatever is slower than the
boot process and the machine always get stuck with "cannot find
/san_storage (/dev/multipath/...) please enter /bin/sh location"  

Usually we just press enter, press control-d, and the boot process
continues. 

The problem is that the machine cannot boot unattended. 

Those are some cfg files: 

[root@arsenico ~]# cat /etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/mirror/gm0s1a / ufs rw 1 1
/dev/mirror/gm0s1b none swap sw 0 0
md98 none swap sw,file=/usr/swap1,late 0 0
md99 none swap sw,file=/usr/swap0,late 0 0
/dev/mirror/gm0s1d /var ufs rw 2 2
/dev/mirror/gm0s1e /tmp ufs rw 2 2
/dev/mirror/gm0s1f /usr ufs rw 2 2
/dev/mirror/gm0s1g /repository ufs rw 2 2
fdesc /dev/fd fdescfs rw 0 0
/dev/multipath/Krypton /san_storage ufs rw,late 0 0 

As you see the filesystem is already flagged as "late"... 

[root@arsenico ~]# cat /etc/iscsi.conf 

Krypton_C0_P0 {
TargetName=iqn.1984-05.com.dell:powervault.md3200i.6782bcb0007496a24f1e49ee
TargetAddress=10.40.3.200
} 

That's the SAN, we dropped the dual connection so maybe we could get rid
of geom_multipath if that is the problem, but... hey... 

[root@arsenico ~]# gmultipath list
Geom name: Krypton
Type: AUTOMATIC
Mode: Active/Active
UUID: 101b1867-c623-11e8-8bab-90e2ba021650
State: DEGRADED
Providers:
1. Name: multipath/Krypton
Mediasize: 15998753177088 (15T)
Sectorsize: 512
Mode: r1w1e1
State: DEGRADED
Consumers:
1. Name: da2
Mediasize: 15998753177600 (15T)
Sectorsize: 512
Mode: r2w2e2
State: ACTIVE 

[root@arsenico ~]# camcontrol devlist
 at scbus0 target 5 lun 0 (pass0,da0)
 at scbus0 target 6 lun 0 (pass1,da1)
 at scbus3 target 0 lun 0 (cd0,pass2)
 at scbus5 target 0 lun 0 (da2,pass3)
 at scbus5 target 0 lun 1f (da3,pass4) 

Any interesting suggestions? 

Thanks a lot. 

-- 

Andrea Brancatelli
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: How to make 'named' rc script invokded earlier at boot time

2021-04-30 Thread Yasuhiro Kimura
From: Mathieu Arnold 
Subject: Re: How to make 'named' rc script invokded earlier at boot time
Date: Fri, 30 Apr 2021 10:02:31 +0200

> There is an option in the port to have named start later, but up to now,
> it was starting early enough.
> 
> The only way I can see is modify the named rc script and add the
> services that needs named to be started on the BEFORE line at the
> beginning of the script. Mind you, it really needs to start after
> syslog (unless you log directly to files and do not use syslog.)

Thanks for advice. I'll try it.

---
Yasuhiro Kimura
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: How to make 'named' rc script invokded earlier at boot time

2021-04-30 Thread Yasuhiro Kimura
From: b56...@oldach.net (Helge Oldach)
Subject: Re: How to make 'named' rc script invokded earlier at boot time
Date: Fri, 30 Apr 2021 10:01:47 +0200 (CEST)

> Can you try rcorder -p? That will group equally ranked scripts on the same 
> line.
> 
> On 13, I'm seeing:
> 
> (snip)
> /etc/rc.d/pwcheck /etc/rc.d/watchdogd /usr/local/etc/rc.d/named 
> /etc/rc.d/auditd /etc/rc.d/ntpdate /etc/rc.d/bsnmpd /etc/rc.d/savecore 
> /etc/rc.d/power_profile /etc/rc.d/localpkg /etc/rc.d/hastd
> /etc/rc.d/rpcbind /etc/rc.d/SERVERS /etc/rc.d/auditdistd
> (snip)
> 
> which implies that the ordering of named and ntpdate is random however both 
> are before SERVERS.
> 
> Kind regards
> Helge

I get following result.

(snip)
/etc/rc.d/NETWORKING
/etc/rc.d/kdc /etc/rc.d/kfd /etc/rc.d/pppoed /etc/rc.d/nfsuserd /etc/rc.d/iscsid
/etc/rc.d/iscsictl /etc/rc.d/nfscbd /etc/rc.d/kpasswdd /etc/rc.d/kadmind 
/etc/rc.d/ipropd_slave /etc/rc.d/ipropd_master/etc/rc.d/mountcritremote
/etc/rc.d/devfs /etc/rc.d/virecover /etc/rc.d/os-release /etc/rc.d/motd 
/etc/rc.d/archdep /etc/rc.d/mdconfig2 /etc/rc.d/gptboot 
/etc/rc.d/wpa_supplicant /etc/rc.d/accounting /etc/rc.d/dmesg 
/etc/rc.d/cleartmp /etc/rc.d/hostapd /etc/rc.d/newsyslog
/etc/rc.d/syslogd /etc/rc.d/sysvipc /etc/rc.d/linux
/etc/rc.d/pwcheck /etc/rc.d/localpkg /etc/rc.d/power_profile /etc/rc.d/auditd 
/etc/rc.d/bsnmpd /etc/rc.d/ntpdate /etc/rc.d/savecore /etc/rc.d/watchdogd
/etc/rc.d/rpcbind /etc/rc.d/auditdistd
/etc/rc.d/nfsclient
/usr/local/etc/rc.d/tpmd
/usr/local/etc/rc.d/tcsd
/etc/rc.d/hastd /usr/local/etc/rc.d/named
/etc/rc.d/SERVERS
(snip)

'named' is still later than 'ntpdate' on my home server.

---
Yasuhiro Kimura
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: How to make 'named' rc script invokded earlier at boot time

2021-04-30 Thread Mathieu Arnold
On Fri, Apr 30, 2021 at 04:30:54PM +0900, Yasuhiro Kimura wrote:
> Then is there any way to make 'named' rc script invoked earlier at
> boot time on 13.0-RELEASE?

There is an option in the port to have named start later, but up to now,
it was starting early enough.

The only way I can see is modify the named rc script and add the
services that needs named to be started on the BEFORE line at the
beginning of the script. Mind you, it really needs to start after
syslog (unless you log directly to files and do not use syslog.)

-- 
Mathieu Arnold


signature.asc
Description: PGP signature


How to make 'named' rc script invokded earlier at boot time

2021-04-30 Thread Yasuhiro Kimura
I installed dns/bind916 on my home server and configured it so it
worked as both authoritative and recursor. Then I added
'nameserver 127.0.0.1' to /etc/resolv.conf and everything worked fine.

But after updating OS from 12.2-RELEASE to 13.0-RELEASE I noticed
execution of some rc scripts fails at boot time because of DNS lookup
error. And I also found these scripts are executed earlier than
'named'.

Now let me use 'ntpdate' as an example.

If I run `rcorder /etc/rc.d/* /usr/local/etc/rc.d/*` on 12.2-RELEASE,
then I get following result.

--
root@rolling-vm-freebsd3[474]# uname -a
FreeBSD rolling-vm-freebsd3.home.utahime.org 12.2-RELEASE-p6 FreeBSD 
12.2-RELEASE-p6 GENERIC  amd64
root@rolling-vm-freebsd3[475]# rcorder /etc/rc.d/* /usr/local/etc/rc.d/*
/etc/rc.d/growfs
/etc/rc.d/sysctl
/etc/rc.d/hostid
/etc/rc.d/zvol
/etc/rc.d/dumpon
(snip)
/etc/rc.d/static_arp
/etc/rc.d/bridge
/etc/rc.d/route6d
/etc/rc.d/NETWORKING
/etc/rc.d/mountcritremote
/etc/rc.d/devfs
/etc/rc.d/ipmon
/etc/rc.d/kdc
/etc/rc.d/mdconfig2
/etc/rc.d/newsyslog
/etc/rc.d/syslogd
/usr/local/etc/rc.d/tcsd
/usr/local/etc/rc.d/named
/etc/rc.d/watchdogd
/etc/rc.d/savecore
/etc/rc.d/archdep
/etc/rc.d/linux
/etc/rc.d/sysvipc
/etc/rc.d/SERVERS
/usr/local/etc/rc.d/tpmd
/usr/local/etc/rc.d/stunnel
/etc/rc.d/accounting
/etc/rc.d/ntpdate
/etc/rc.d/rpcbind
/etc/rc.d/nfsclient
/etc/rc.d/nisdomain
(snip)
--

As you can see, while 'named' is executed before SERVERS, 'ntpdate' is
done after it.

On the other hand I get following result on 13.0-RELEASE.

--
root@rolling-vm-freebsd2[332]# uname -a
FreeBSD rolling-vm-freebsd2.home.utahime.org 13.0-RELEASE FreeBSD 13.0-RELEASE 
#0 releng/13.0-n244733-ea31abc261f: Fri Apr  9 04:24:09 UTC 2021 
r...@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
root@rolling-vm-freebsd2[333]# rcorder /etc/rc.d/* /usr/local/etc/rc.d/*
/etc/rc.d/dhclient
/etc/rc.d/dumpon
/etc/rc.d/growfs
/etc/rc.d/natd
(snip)
/etc/rc.d/netwait
/etc/rc.d/blacklistd
/etc/rc.d/local_unbound
/etc/rc.d/NETWORKING
/etc/rc.d/pppoed
/etc/rc.d/kdc
/etc/rc.d/kfd
/etc/rc.d/nfsuserd
/etc/rc.d/iscsid
/etc/rc.d/ipropd_slave
/etc/rc.d/nfscbd
/etc/rc.d/iscsictl
/etc/rc.d/ipropd_master
/etc/rc.d/kadmind
/etc/rc.d/kpasswdd
/etc/rc.d/mountcritremote
/etc/rc.d/wpa_supplicant
/etc/rc.d/motd
/etc/rc.d/accounting
/etc/rc.d/cleartmp
/etc/rc.d/dmesg
/etc/rc.d/archdep
/etc/rc.d/gptboot
/etc/rc.d/hostapd
/etc/rc.d/virecover
/etc/rc.d/mdconfig2
/etc/rc.d/devfs
/etc/rc.d/os-release
/etc/rc.d/newsyslog
/etc/rc.d/linux
/etc/rc.d/syslogd
/etc/rc.d/sysvipc
/etc/rc.d/watchdogd
/etc/rc.d/savecore
/etc/rc.d/ntpdate
/etc/rc.d/localpkg
/etc/rc.d/auditd
/etc/rc.d/bsnmpd
/etc/rc.d/pwcheck
/etc/rc.d/power_profile
/etc/rc.d/rpcbind
/etc/rc.d/auditdistd
/usr/local/etc/rc.d/named
/etc/rc.d/nfsclient
/etc/rc.d/hastd
/etc/rc.d/SERVERS
/etc/rc.d/nisdomain
/usr/local/etc/rc.d/stunnel
/usr/local/etc/rc.d/tpmd
/usr/local/etc/rc.d/tcsd
(snip)
--

Now both 'named' and 'ntpdate' are executed before SERVERS. And
unfortunately the latter is earlier than the former. So it is natural
that execution of 'ntpdate' fails with DNS lookup failure.

I compared ntpdate rc script between releng/12.2 and releng/13.0 but
there is no difference.

--
yasu@rolling-vm-freebsd2[1035]% pwd
/usr/src
yasu@rolling-vm-freebsd2[1036]% git diff origin/releng/12.2 origin/releng/13.0  
-- libexec/rc/rc.d/ntpdate
yasu@rolling-vm-freebsd2[1037]%
--

And of cource there is no difference with /usr/local/etc/rc.d/named
either. So it seems evaluation of rcorder(8) is changed between
12.2-RELASE and 13.0-RELEASE.

Then is there any way to make 'named' rc script invoked earlier at
boot time on 13.0-RELEASE?

Best Regards.

---
Yasuhiro Kimura
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"