Re: 13.4 and zfs.mount_snapshot for jail

From: James Gritton <jamie_at_gritton.org>
Date: Sun, 29 Sep 2024 15:55:38 UTC
On 2024-09-29 03:35, Andrea Venturoli wrote:
> I've been using ezjail with:
>> export jail_fs_parameters="allow.mount.fdescfs=true enforce_statfs=1 
>> zfs.mount_snapshot=1"
> for a long time.
> It works on 13.3 and 14.1.
> 
> However, I upgraded one machine to 13.4 and now such a jail does not 
> start anymore:
>> # ezjail-admin start fs
>> Starting jails: cannot start jail  "fs2": jail: fs: jail_set: Invalid 
>> argument
>> .
>> /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables  
>> is obsolete.  Please consider migrating to /etc/jail.conf.
>> Error: Could not restart fs.
>>   You need to restart it by hand.
> 
> I searched UPDATING, docs, bugs, etc... but could not find anything 
> relevant.
> Is this a regression or does the config need some change in any way?

This is a regression; check out BUG 274263.  Unfortunately 13.3 made it 
out the door broken in this regard.  The good news, such as it is, is 
that the kernel can still do the right thing, just not through jail(8).

There's a small program at 
https://bz-attachments.freebsd.org/attachment.cgi?id=253669 that will 
set zfs.mount_snapshot=1 for the jails named on the command line.  You 
can run this, after the jails are created without zfs.mount_snapshot.

I apologize for the breakage, and hope this band-aid will do for now.

- Jamie