Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 2023 19:44:13 +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@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 271069
           Summary: syslogd service inside client jail requires restart
                    before server jail receives logs
           Product: Base System
           Version: 13.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: me@svmhdvn.name

I'm not sure if this is an actual bug or an issue with my system configurat=
ion:

PROBLEM:

In a centralized logging configuration with one client jail (sending logs) =
and
one server jail (receiving logs and writing them to local files), syslogd
inside the *client* jail requires a restart before I can observe on the
*server* jail that the logs are successfully received. This is observed on a
fresh start of the *server* jail, followed by a fresh start of the *client*
jail.

Is there a race condition or order of operations problem somewhere? Let me =
know
if I need to supply more info about the configuration.

DETAILS:

I have a simple configuration of two standard thick jails (named 'ssh' and
'logs') with this configuration:

=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 "/usr/jail/guests/${name}";
host.hostname =3D "${name}.my.domain";
exec.start =3D "/bin/sh /etc/rc";
exec.stop =3D "/bin/sh /etc/rc.shutdown";
logs {
    ip6.addr =3D "re0|fdac::aaaa:201/64";
}
ssh {
    ip6.addr =3D "re0|fdac::aaaa:202/64";
    depend =3D "logs";
}
=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

Each jail has the same content in their host files and no DNS servers (i.e.
name resolution is available through hosts files only):

=3D=3D=3D=3D=3D /etc/hosts =3D=3D=3D=3D=3D
[...]
fdac::aaaa:201    logs.my.domain logs
fdac::aaaa:202    ssh.my.domain ssh
[...]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

In the client jail ssh.my.domain:

=3D=3D=3D=3D=3D /etc/syslog.conf =3D=3D=3D=3D
*.*    @logs.my.domain
=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 /etc/rc.conf =3D=3D=3D=3D
syslogd_flags=3D"-8 -O syslog -s -v -v"
=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

In the server jail logs.my.domain:

=3D=3D=3D=3D=3D /etc/syslog.conf =3D=3D=3D=3D
+ssh.my.domain
*.*    /var/log/ssh.my.domain.log
=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 /etc/rc.conf =3D=3D=3D=3D
syslogd_flags=3D"-8 -O syslog -a '*.my.domain' -v -v"
=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

Steps to repro (as root):

1. in the jailhost:
    # service jail onestart logs
    # service jail onestart ssh
2. inside logs.my.domain (for observing received logs):
    # tail -f /var/log/ssh.my.domain.log
    [...] follow the log
3. inside ssh.my.domain:
    # logger "hello from ssh" <--- *NOT* observed on the log server
    # service syslogd restart
    # logger "hello from ssh" <--- SUCCESS visible in log server

--=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>