jails iocage clone/promote functionality

Hello,

I posted about this on TrueNas forums but got no response so hoping to do better here.

I recently upgraded to TrueNas 13 which runs FreeBSD 13.1, I know this is already EOL but this is the current stable TrueNas train. I am running iocage jails and I wished to use the clone functionality prior to upgrading the jail from 12.2 to 13.1. I did this, performed the upgrade on the jail, updaged my packages, tested functionality successfully and am ready to promote the clone and then destroy the source (or that was my understanding of the functionality) however the iocage promote command does not appear to be present and does not even appear when looking at iocage --help.

My question is whats the best way to proceed with this clone scenario? Currently running off of the clone with no issues yet. It does show up as a snapshot when I look at iocage snapshots.
 
https://iocage.readthedocs.io/en/latest/advanced-use.html?highlight=clone still mentions clones. On the other hand it says
Code:
Promoting a Clone

Warning
This functionality isn’t fully added to iocage, and may not function as expected.
To promote a cloned jail, run:

iocage promote [UUID | NAME]

This reverses the clone and source jail relationship. The clone becomes the source and the source jail is demoted to a clone.
In ZFS a clone shares storage with its origin snapshot. The clone can only exist with the origin snapshot remains available. When the clone is promoted the clone is on its own. But if I am not wrong the roles of the clone and the origin snapshot are never swapped.
 
https://iocage.readthedocs.io/en/latest/advanced-use.html?highlight=clone still mentions clones. On the other hand it says
Code:
Promoting a Clone

Warning
This functionality isn’t fully added to iocage, and may not function as expected.
To promote a cloned jail, run:

iocage promote [UUID | NAME]

This reverses the clone and source jail relationship. The clone becomes the source and the source jail is demoted to a clone.
In ZFS a clone shares storage with its origin snapshot. The clone can only exist with the origin snapshot remains available. When the clone is promoted the clone is on its own. But if I am not wrong the roles of the clone and the origin snapshot are never swapped.
So really I suppose I'm just looking to figure out how to proceed and consolidate the clone and source since it appears as a snapshot. I would expect to possibly run into issues when I try and upgrade again and then have a nested snapshot situation.
 
Let us assume you have a FreeBSD-13.x jail and take a snapshot. You can use that snapshot to create one or more clones of it. All will be FreeBSD-13.x. If you upgrade the original FreeBSD-13.x jail to FreeBSD-14.x the snapshot does not change. Therefor the clones are not upgraded as well.

Now you can make a new snapshot of the FreeBSD-14.x jail and clone it. Then you can copy all the configurations of the clones running FreeBSD-13.x to the new clones running FreeBSD-14.x. If the new clones work you can destroy the FreeBSD-13.x jails and the FreeBSD-13.x snapshot. This is my usual workflow.

You can also upgrade one of the clone jails, promote it to continue its life as an independent data set, take a snapshot of that and use it to create other jails by cloning. Then you have to take care about the configurations as above.

You can also use a jail manager which handles a base jail and provides the same base system to all jails by null-mount. Then upgrading the base jail from FreeBSD-13.x to FreeBSD-14.x will take effect for all related jails. For that method no cloning is required.
 
Back
Top