Upgrading Jails from 11.3 (FreeNas) to 12.0 (TrueNas)

SupplePigeon

Cadet
Joined
Oct 27, 2020
Messages
5
I have recently upgraded from FreeNas 11.3 to TrueNas 12.0. My new system is up and running normally. However the Jails are still at 11.3. Doing a standard update on the jail fails with "Error: Major ABI change detected, please run 'upgrade' instead. "

I even ran an "upgrade" from shell using BSD commands, but the jail is still at 11.3. Is there a way for me to upgrade the jail to the same version as the new 12.0 TrueNas?

If so, I haven't been able to find any documentation on it.


Regards,

SP
 

SupplePigeon

Cadet
Joined
Oct 27, 2020
Messages
5
Search this forum for iocage upgrade -r 12.1-RELEASE jailname
Thank You for the quick reply. I am still learning all of this and wasn't even aware of the iocage upgrade command. I was able to upgrade my current jails and they seem to be working normally.

Thanks again for your help!

SP
 

rudds

Dabbler
Joined
Apr 17, 2018
Messages
34
I've got a single basejail created under 11.3, with a number of other jails cloned from it and customized for various purposes. In 11.3, I could iocage update the basejail and all of its clones would also be updated automatically.

After updating to TrueNAS 12, I successfully upgraded the basejail to 12.1-RELEASE per above, but running a freebsd-version in any of the clones shows them as still being on 11.3-RELEASE-p14. Did something change here? In my understanding this isn't expected behavior based on how basejails and clones relate to each other.
 
Joined
Jul 10, 2016
Messages
521
Note that iocage update is not the same as iocage upgrade.

A base jail mounts the userland of the release it was created from, as a result all base jails refer to that same release and you only have to iocage update once. The iocage upgrade command will point a base jail to a different release. You will need to do that for each base jail you want to upgrade.

There are some related experiments in this thread: https://www.truenas.com/community/threads/iocage-jail-type-base-jail-vs-clone-which-to-choose.82639/
 

rudds

Dabbler
Joined
Apr 17, 2018
Messages
34
That's helpful, thanks (you've provided me quite a bit of help on jails judging by that older thread).

Once the clones are upgraded to 12.1, will subsequent updates trickle down from the original basejail as before?

Also, I opted for 12.1-RELEASE per the posts above. Would it have been feasible to use 12.2-RELEASE instead, seeing as TrueNAS is apparently build on 12.2-RC3, or would that be premature? I assume using a slightly outdated version for jails is preferable to surpassing the host system?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
That's helpful, thanks (you've provided me quite a bit of help on jails judging by that older thread).

Once the clones are upgraded to 12.1, will subsequent updates trickle down from the original basejail as before?

Also, I opted for 12.1-RELEASE per the posts above. Would it have been feasible to use 12.2-RELEASE instead, seeing as TrueNAS is apparently build on 12.2-RC3, or would that be premature? I assume using a slightly outdated version for jails is preferable to surpassing the host system?
Jails should never be newer than the base OS.
 
Joined
Jul 10, 2016
Messages
521
Once the clones are upgraded to 12.1, will subsequent updates trickle down from the original basejail as before?
Correct, the iocage update will work as you described above.

It looks like FreeBSD 12.2-RELEASE was just officially released today 27-OCT-2020. TrueNAS actually tracks 12-STABLE not release, but I personally prefer to let the dust settle before making the jump.
 

Andrew Ostrom

Explorer
Joined
Jul 28, 2017
Messages
57
I am having all kinds of problems with this. I upgraded from 11.3-U5 to TrueNAS Core 12.0 tonight. Plex did not start. After much online searching I found a few places that talked about using the iocage upgrade command. That didn't work for me, and after a lot of head scratching I figured out (I think) that I had to do a iocage fetch and then fetch the 12.1-RELEASE. That worked fine.

Now, when I do a iocage upgrade -r 12.1-RELEASE plex I get an error (below) about not finding a file called plex.json. There is a file in that folder named "plexmediaserver-plexpass.json", but not just plex.json.

Here is what I'm getting:
Code:
root@freenas[~]# iocage upgrade -r 12.1-RELEASE plex
Snapshotting plex...
Snapshot already exists
Updating plugin INDEX...
Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 10, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/iocage_cli/upgrade.py", line 40, in cli
    ioc.IOCage(jail=jail, skip_jails=skip_jails).upgrade(release)
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/iocage.py", line 2102, in upgrade
    new_release = ioc_plugin.IOCPlugin(
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_plugin.py", line 1307, in upgrade
    shutil.copy(
  File "/usr/local/lib/python3.8/shutil.py", line 415, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/local/lib/python3.8/shutil.py", line 261, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/BigPool/iocage/.plugins/github_com_freenas_iocage-ix-plugins_git/plex.json'


Here's the contents of that directory:

Code:
root@freenas[~]# ls /mnt/BigPool/iocage/.plugins/github_com_freenas_iocage-ix-plugins_git
.git                            icons                           README.md
asigra-11.1.json                INDEX                           syncthing.json
asigra.json                     nextcloud.json                  tarsnap.json
bitcoin-node.json               plexmediaserver-plexpass.json   template
iconik.json                     plexmediaserver.json


HELP!

Andy Ostrom
 
Joined
Jul 10, 2016
Messages
521
There are some known issues specific to upgrading older versions of the plex plugin. Read this post for instructions and adapt accordingly:

 

Andrew Ostrom

Explorer
Joined
Jul 28, 2017
Messages
57
There are some known issues specific to upgrading older versions of the plex plugin. Read this post for instructions and adapt accordingly:

Thanks! I'm reading it now. It strikes me that the release notes should mention that this is an issue since many (I think) FreeNAS (vs. TrueNAS) users run Plex Servers.
 
Top