Make sure to follow and check these boxes before submitting an issue! Thank you.
iocage --versionmaster if using# iocage v 1.1 and 1.2-BETA (sha#ca04bf)
# uname FreeBSD 12.0-RELEASE-p3 amd64
# iocage activate zroot
ZFS pool 'zroot' successfully activated.
Creating zroot/iocage
Creating zroot/iocage/download
Creating zroot/iocage/images
Creating zroot/iocage/jails
Creating zroot/iocage/log
Creating zroot/iocage/releases
Creating zroot/iocage/templates
# iocage fetch
Traceback (most recent call last):
File "/usr/local/bin/iocage", line 10, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/iocage_cli/fetch.py", line 129, in cli
ioc.IOCage().fetch(**kwargs)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 115, in __init__
self.pool = PoolAndDataset().get_pool()
File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 55, in __init__
self.pool = ioc_json.IOCJson().json_get_value("pool")
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_json.py", line 1435, in __init__
super().__init__(location, checking_datasets, silent, callback)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_json.py", line 668, in __init__
self.pool, self.iocroot = self.get_pool_and_iocroot()
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_json.py", line 816, in get_pool_and_iocroot
return pool, get_iocroot()
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_json.py", line 814, in get_iocroot
raise RuntimeError(f"Please set a mountpoint on {loc}")
RuntimeError: Please set a mountpoint on zroot/iocage
This appears to be related to not having a mountpoint set on the activated pool's root dataset zfs get mountpoint zroot returns none. I assume this would also fail if legacy mountpoints via fstab are being used. I had a cursory look through activate but didn't work out where or how this should be set yet, I'm not familiar with python.
I think that this is a common enough zpool setup to warrant manually setting mountpoint if none is defined.
This is expected, it may change in the future and set a mountpoint though. It gets hairy with altroots in particular (FreeNAS)
For folks who stumble onto this and aren't quite sure what's being asked of them, here's one solution from Albert Valbuena on adminbyaccident.com
We first create the directory
$ sudo mkdir /zroot
Now we set the mountpoint for zroot/iocage using the following command:
$ sudo zfs set mountpoint=/zroot zroot/iocage
For anyone else that stumbles on this, I would think that a slightly better solution is to mount the iocage dataset in /iocage instead of /zroot. I stumbled on this when I setup a new FreeBSD jail host. I looked at a old installation, and there the iocage dataset were mounted on /iocage.. So, in other words:
$ sudo mkdir /iocage
$ sudo zfs set mountpoint=/iocage zroot/iocage
Most helpful comment
For anyone else that stumbles on this, I would think that a slightly better solution is to mount the iocage dataset in /iocage instead of /zroot. I stumbled on this when I setup a new FreeBSD jail host. I looked at a old installation, and there the iocage dataset were mounted on /iocage.. So, in other words: