#
0a603a6e |
| 10-Jan-2019 |
Kyle Evans <kevans@FreeBSD.org> |
libbe(3): Change be_mount to mount/unmount child datasets
This set of changes is geared towards making bectl respect deep boot environments when they exist and are mounted. The deep BE composition f
libbe(3): Change be_mount to mount/unmount child datasets
This set of changes is geared towards making bectl respect deep boot environments when they exist and are mounted. The deep BE composition functionality (`bectl add`) remains disabled for the time being. This set of changes has no effect for the average user. but allows deep BE users to upgrade properly with their current setup.
libbe(3): Open the target boot environment and get a zfs handle, then pass that with the target mountpoint to be_mount_iter; If the BE_MNT_DEEP flag is set call zfs_iter_filesystems and mount the child datasets.
Similar logic is employed when unmounting the datasets, save for children are unmounted first.
bectl(8): Change bectl_cmd_jail to pass the BE_MNT_DEEP flag when calling be_mount as well as call be_unmount when cleaning up after the jail has exited instead of umount(2) directly.
PR: 234795 Submitted by: Wes Maag <jwmaag_gmail.com> (test additions by kevans) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18796
show more ...
|
#
7ce09314 |
| 25-Dec-2018 |
Kyle Evans <kevans@FreeBSD.org> |
bectl: use jail id as the default jail name for a boot environment
By default, bectl is setting the jail 'name' parameter to the boot environment name, which causes an error when the boot environmen
bectl: use jail id as the default jail name for a boot environment
By default, bectl is setting the jail 'name' parameter to the boot environment name, which causes an error when the boot environment name is not a valid jail name. With the attached fix, when no name is supplied, the default jail name will be the jail id - this is is the same behavior as the jail command.
Additionally, this commit addresses two other bugs that prevented unjailing in scenarios where the jail name does not match the boot environment name:
1. In 'bectl_locate_jail', 'mountpoint' is used to resolve the boot environment path, but really 'mounted' should be used. 'mountpoint' is the path where the zfs dataset will be mounted. 'mounted' is the path where the dataset is actually mounted.
2. in 'bectl_search_jail_paths', 'jail_getv' would fail after the first call. Which is fine, if the boot environment you're unjailing is the next one up. According to 'man jail_getv', it's expecting name and value strings. 'jail_getv' is being passed an integer for the lastjid, so amend that to use a string instead.
Test cases have been amended to reflect the bugs found.
PR: 233637 Submitted by: Rob <rob.fx907_gmail.com> MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D18607
show more ...
|
#
6fc21012 |
| 19-Nov-2018 |
Kyle Evans <kevans@FreeBSD.org> |
bectl(8) tests: attempt to load the ZFS module
Observed in a CI test image, bectl_create test will run and be marked as skipped because the module is not loaded. The first zpool invocation will auto
bectl(8) tests: attempt to load the ZFS module
Observed in a CI test image, bectl_create test will run and be marked as skipped because the module is not loaded. The first zpool invocation will automagically load the module, but bectl_create is still skipped. Subsequent tests all pass as expected because the module is now loaded and everything is OK.
MFC after: 3 days
show more ...
|
#
9c1535e9 |
| 19-Nov-2018 |
Kyle Evans <kevans@FreeBSD.org> |
bectl(8): Add some regression tests
These tests operate on a file-backed zpool that gets created in the kyua temp dir. root and ZFS support are both required for these tests. Current tests cover cre
bectl(8): Add some regression tests
These tests operate on a file-backed zpool that gets created in the kyua temp dir. root and ZFS support are both required for these tests. Current tests cover create, destroy, export/import, jail, list (kind of), mount, rename, and jail.
List tests should later be extended to cover formatting and the different list flags, but for now only covers basic "are create/destroy actually reflected properly"
MFC after: 3 days
show more ...
|