-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable use of a prefix in the zfs tree used by iocage #34
base: master
Are you sure you want to change the base?
Conversation
Use isinstance() instead of type() Co-authored-by: Vincent Barbaresi <[email protected]>
Instead of using pool/iocage, we can now use anything like pool/some/prefix/iocage, which enables iocage use within jails. To do so, use the -p / --prefix option with iocage activate. The prefix is then stored as a ZFS property of the pool and used for all commands. A fixture is also added to the tests to enable functional tests.
Pull Request Test Coverage Report for Build 11026351515Details
💛 - Coveralls |
It's a big change, and a good idea IMHO. |
While thinking, why not including /iocage in iocroot variable, this may allow using arbitrary zfs to contain jails without mandatory /iocage/ parent zfs ? |
Yes that's possible. I will try to make things work with the prefix approach work first and then we can improve. For the first step I preferred changing the least I could. For configuration, I went with settings in I am still working on some issues with hierarchical jails:
Apart from that, it works. I will do some cleaning up and try to push a new version you can play with in the week. |
Hello,
This PR aimes to close #33 and currently expects #32 being merged first.
I implemented a
--prefix
option to theactivate
command. This prefix is currently saved in a zfs property of the pool, like the active pool flag.Non-regression tests are passing (see checks on fork repo or directly on Cirrus CI).
The issue that remains is that jails, even if they are exposed a dataset they can use, cannot modify the zfs properties of the host pool. So I am not sure how to proceed from there.
I am thinking of implementing a configuration file / a configuration option in
/etc/rc.conf
- but that would break the current iocage philosophy of working only with zfs as its source of information. We could however limit the damage by leaving it optional and only using that way of working if the file / option exists.What do you think?
Make sure to follow and check these boxes before submitting a PR! Thank you.