Fix storage and fstab basejail bugs - #772
Merged
Merged
Conversation
gronke
commented
Jul 8, 2026
Member
- The procfs and linprocfs mount commands are built with proper arguments instead of concatenating to "mount-t" and "procfsproc", a missing config key skips the mount instead of raising, and MountFailed reports the mountpoint when the mount command fails.
- update_release sets the release attribute that Fstab declares instead of assigning to the jails read-only release property.
- Parsing a jail fstab skips the auto-created basejail destinations again: the storage backend class is checked with issubclass and queried through _get_basejail_mounts, and the mutable default argument is no longer mutated.
Missing commas concatenated the arguments to mount-t and procfsproc, so mounting procfs or linprocfs into a jail could never have worked. A missing config key now skips the mount instead of raising, MountFailed reports the mountpoint instead of the filesystem type when the mount command fails, and linprocfs no longer requires mount_procfs to be enabled.
update_release assigned to the jails read-only release property and crashed with an AttributeError. The release attribute that the class declares was intended.
The check used isinstance on the storage backend class, which is always False, and the intended list of basejail mounts was read from an attribute that does not exist. The backend class is now checked with issubclass and queried through _get_basejail_mounts, and the skip list is rebound so that the mutable default argument stays unchanged.
Nullfs mounts sourced from ZFS snapshot directories do not appear in the getfsstat output on FreeBSD 13, so the test for starting a basejail read as if no mounts existed and was marked expected-to-fail. Enabling basejail on an existing jail works; the test now proves each base directory mount through statfs, a read-only write probe and a clean unmount after stopping the jail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.