Skip to content

Commit

Permalink
workaround ZFS unjail issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gronke committed Sep 20, 2018
1 parent dd40360 commit 52aca6f
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions iocage/ZFSShareStorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,26 @@ def umount_zfs_shares(self) -> None:
"""Unmount a running jails shared ZFS datasets."""
for dataset in self.get_zfs_datasets():
self.logger.verbose(f"Unmounting ZFS Dataset {dataset.name}")
self._exec_jail([
self._exec([
"/sbin/zfs",
"set",
"jailed=off",
dataset.name
])
self._exec([
"/sbin/zfs",
"umount",
dataset.name
])
self._exec([
"/sbin/zfs",
"unjail",
self.jail.identifier,
"mount",
dataset.name
])
self._exec([
"/sbin/zfs",
"set",
"jailed=on",
dataset.name
])

Expand Down

0 comments on commit 52aca6f

Please sign in to comment.