Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 May 2023 22:55:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 271069] syslogd service inside client jail requires restart before server jail receives logs
Message-ID:  <bug-271069-227-W6ZM30WVAs@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-271069-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-271069-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271069

--- Comment #3 from Siva Mahadevan <me@svmhdvn.name> ---
Revisiting this because the bug shows up consistently and with different
services as well.

I've reduced it to a smaller repro case. Not sure what's going on (but I do
have the time to debug this and send a patch once the problem is clear), so
please let me know if you have any pointers on what to try next for debuggi=
ng
this.

Repro instructions:
1. Fresh install FreeBSD 13.2-RELEASE (jailhost.home.arpa)
2. Add the following /etc/jail.conf

=3D=3D=3D=3D=3D /etc/jail.conf =3D=3D=3D=3D=3D
mount.devfs;
allow.raw_sockets;
exec.clean;
exec.timeout =3D 30;
stop.timeout =3D 30;
path =3D "/j/${name}";
host.hostname =3D "${name}.home.arpa";
exec.start =3D "/bin/sh /etc/rc";
exec.stop =3D "/bin/sh /etc/rc.shutdown";
myjail {
    ip6.addr =3D "re0|fdac::aaaa:202/64";
}
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D

3. Install a fresh 13.2-RELEASE jail with `bsdinstall jail /j/myjail`
4. Add the following /j/myjail/etc/rc.conf

=3D=3D=3D=3D=3D /j/myjail/etc/rc.conf =3D=3D=3D=3D=3D
dumpdev=3D"NO"=20=20=20=20
sendmail_enable=3D"NO"=20=20=20=20
sendmail_msp_queue_enable=3D"NO"=20=20=20=20
sendmail_outbound_enable=3D"NO"=20=20=20=20
sendmail_submit_enable=3D"NO"

sshd_enable=3D"YES"
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D

5. Start the jail verbosely to confirm that rc starts sshd: `jail -vc myjai=
l`

myjail: run command: /sbin/ifconfig re0 inet6 fdac::aaaa:202/64 alias
myjail: run command: /sbin/mount -t devfs -oruleset=3D4 . /j/myjail/dev
myjail: jail_set(JAIL_CREATE) persist name=3Dmyjail allow.raw_sockets
path=3D/j/myjail host.hostname=3Dmyjail.home.arpa ip6.addr=3Dfdac::aaaa:202
myjail: created
myjail: run command in jail: /bin/sh /etc/rc
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
32-bit compatibility ldconfig path: /usr/lib32
Updating motd:.
Creating and/or trimming log files.
Clearing /tmp (X related).
Updating /var/run/os-release done.
Starting syslogd.
Performing sanity check on sshd configuration.
Starting sshd.
Starting cron.

Wed May 31 18:48:36 EDT 2023
myjail: jail_set(JAIL_UPDATE) jid=3D1 nopersist

6. Check running processes inside jail and confirm that sshd is *not* runni=
ng:
`ps -J myjail`

 PID TT  STAT    TIME COMMAND
1151  -  IsJ  0:00.01 /usr/sbin/syslogd -s
1207  -  SsJ  0:00.01 /usr/sbin/cron -s

7. Log into the jail and restart sshd, confirm that it *does* run successfu=
lly:

```
(jailhost) jexec myjail sh
(myjail) service sshd restart
```

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271069-227-W6ZM30WVAs>