I'm running FreeBSD 11.3-RELEASE-p3.
The jail manager is qjail.
There's a jail for the mariadb database server that should serve some other web server jails, via a unix socket, not through the network.
Let's call this the `mariadb` jail.
When the jail is started, the service mysqld-server is started automatically and a socket is placed in /var/run/mysql/mysql.sock
A related jail is started that mounts the /var/run/mysql directory of the mariadb jail in its own /var/run/mysql directory.
This is the line of the corresponding /usr/local/etc/qjail.fstab/webjail file:
So far, so good.
But when the webjail is restarted, the mysql.sock file in the mariadb's /var/run/mysql directory disappears and access to the database server is lost to all jails depending on it.
I don't understand the logic of this, that's why I'm asking here.
The jail manager is qjail.
There's a jail for the mariadb database server that should serve some other web server jails, via a unix socket, not through the network.
Let's call this the `mariadb` jail.
When the jail is started, the service mysqld-server is started automatically and a socket is placed in /var/run/mysql/mysql.sock
A related jail is started that mounts the /var/run/mysql directory of the mariadb jail in its own /var/run/mysql directory.
This is the line of the corresponding /usr/local/etc/qjail.fstab/webjail file:
Code:
/usr/jails/mariadb/var/run/mysql /usr/jails/webjail/var/run/mysql nullfs rw 0 0
So far, so good.
But when the webjail is restarted, the mysql.sock file in the mariadb's /var/run/mysql directory disappears and access to the database server is lost to all jails depending on it.
I don't understand the logic of this, that's why I'm asking here.