I've wrote a working prototype for the jail migration over the weekend. Migrations with some freshly set up jails on my testing server at home went fine, so today I was testing it on the jails in my devel/staging environment at work. All devel/staging jails migrated fine and are currently managed by iocell
I triggered a failure on a thick jail early on at home, where iocell couldn't find/restructure some datasets on first startup and complained about unsupported properties, but I couldn't reproduce it. Even here none of the thick jails (which are kind of legacy anyways, everything newer is a basejail) triggered this error again. As the affected jail just worked fine after the first "failed" startup and I couldn't reproduce it within ~35 thickjail migrations, I just have to put this aside and hope to fall over it again and maybe get it to be reproducible.
iocell already has some migration mechanics in place, e.g. the zfs dataset structure gets updated on first start of a migrated jail and
iocell list
also generates a default config file when it discovers a new jail in /iocell/jails/; although this seems to be a side-effect of calling uclcmd. Still investigating on this. OTOH "
iocell reset
", which shuld set the jails config to defaults, fails to generate a config if the file isn't already there. I'll have a look at this and fix it beforehand, this way I can give myself an overview what mechanisms are already there and maybe could leverage
iocell reset
for the initial config generation after migration instead of using a side-effect of
iocell list
which might go away sometime.
I started to build an ioc-migrate script from my prototype and added the "iocell migrate" option. It basically works, but I feel it needs a lot of polishing and some more safety-nets to get up to the standards. Also it lacks proper integration and usage of the already present functions, variables etc in iocell.
I hope to find enough time this week to push a first working (and presentable) implementation before the holidays. (This will be my first commit to a public repo - I hope I won't screw up
).