Hello!
I am unsure if my case is working as intended or is a bug, but consider the following jail config file:
in /usr/local/jails/containers/test-ordering is a ZFS clone of 14.1-RELEASE@p3 snapshot.
Starting the jail for the first time, I get the following error message:
Reading the relevant bits of documentation for jail(8)():
I thought that 'exec.prepare' would run to its completion and only after it the 'mount.fstab' checks the existence of the file, however, the error message pasted above indicates otherwise.
Meanwhile, if I "out-of-band" touch the
and start the jail afterwards, it comes up without problems and reads the actual contents of the fstab file!
This leads me to believe I have encountered a bug within ordering of the jail pseudo-parameters, but I want to check here first.
Thank you for comments!
Libor
I am unsure if my case is working as intended or is a bug, but consider the following jail config file:
Code:
$ cat /etc/jail.conf.d/test-ordering.conf
test-ordering {
host.hostname = "${name}";
path = "/usr/local/jails/containers/${name}";
exec.prepare = "echo tmpfs ${path}/tmp tmpfs rw 0 0 > ${path}/etc/fstab";
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.clean;
exec.consolelog = "/var/log/jail_${name}_console.log";
mount.fstab = "${path}/etc/fstab";
persist;
}
in /usr/local/jails/containers/test-ordering is a ZFS clone of 14.1-RELEASE@p3 snapshot.
Starting the jail for the first time, I get the following error message:
Code:
# service jail onestart test-ordering
Starting jails: cannot start jail "test-ordering":
jail: test-ordering: mount.fstab: /usr/local/jails/containers/test-ordering/etc/fstab: No such file or directory
.
Reading the relevant bits of documentation for jail(8)():
Code:
exec.prepare
Command(s) to run in the system environment to prepare a jail for
creation. These commands are executed before assigning IP
addresses and mounting filesystems, so they may be used to create
a new jail filesystem if it does not already exist.
mount.fstab
An fstab(5) format file containing filesystems to mount before
creating a jail.
I thought that 'exec.prepare' would run to its completion and only after it the 'mount.fstab' checks the existence of the file, however, the error message pasted above indicates otherwise.
Meanwhile, if I "out-of-band" touch the
"${path}/etc/fstab"
: # touch /usr/local/jails/containers/test-ordering/etc/fstab
and start the jail afterwards, it comes up without problems and reads the actual contents of the fstab file!
Code:
# mount -t tmpfs | grep test-ordering
tmpfs on /usr/local/jails/containers/test-ordering/tmp (tmpfs, local)
This leads me to believe I have encountered a bug within ordering of the jail pseudo-parameters, but I want to check here first.
Thank you for comments!
Libor