Upgrading iocage jails

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Ok now it makes more sense. All the jails are reporting to be 11.0 with the freebsd-version command.

Now for more testing.......
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
It worked. I followed the instructions in the iocage docs and ran iocage upgrade test2 -r 11.1-RELEASE with test2 being the name of the jail. It took a bit to download the 7952 patches but when it did it worked.

The output from freebsd-version from the upgraded jail
Code:
root@test2:/ # freebsd-version
11.1-RELEASE-p8


And the output of iocage list
Code:
root@freenas:~ # iocage list
+-----+----------+-------+--------------+---------------+
| JID |   NAME   | STATE |   RELEASE	|	  IP4	  |
+=====+==========+=======+==============+===============+
| -   | b43f1b38 | down  | 11.0-RELEASE | 192.168.0.245 |
+-----+----------+-------+--------------+---------------+
| 1   | test	 | up	| 11.0-RELEASE | 192.168.0.246 |
+-----+----------+-------+--------------+---------------+
| 3   | test2	| up	| 11.1-RELEASE | 192.168.0.245 |
+-----+----------+-------+--------------+---------------+



And just to make sure everything is working correctly
Code:
root@test2:/ # pkg update
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
[test2] Installing pkg-1.10.3_1...
[test2] Extracting pkg-1.10.3_1: 100%
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory
[test2] Fetching meta.txz: 100%	944 B   0.9kB/s	00:01
[test2] Fetching packagesite.txz: 100%	6 MiB   1.0MB/s	00:06
Processing entries: 100%
FreeBSD repository update completed. 28768 packages processed.
All repositories are up to date.
root@test2:/ #



Looks like it was a success, my confidence is restored. Now when to update is the question for me to figure out the answer to.........
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Thanks for taking the time to test this. Looks like iocage jails can be updated from older FreeBSD installations, which is a major positive for FreeNAS moving forward. I have some time 'between contracts' over the next few weeks so might look at upgrading my 9.10.1-U4 to the latest 11.1 now I've removed my dependancy on VirtualBox.

From what I've read in other threads, the VM created in iohyve should continue to work post-upgrade, along with all my warden jails? Plan would be to recreate these (7-8) using iocage one at the time.
 

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
I can confirm an VM creatd with iohyve manually or Warden jail created using the 9.10 version of FreeNAS will work on version 11.1-U4. I've yet to upgrade any of the jails to iocage. My understanding with the iohyve VM's is that they will continue to work normally but they will not be shown within the GUI -- which for me isn't a big deal. The jails however are much more problematic. With the 9.10 jails my freebsd version is listed as 10.3-RELEASE.


--Corrected
 
Last edited:

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
With the 9.3 jails my freebsd version is listed as 10.3-RELEASE.
Then that would be a 9.10 jail since 9.10 is based on FreeBSD 10.3. FreeNAS 9.3 was based on FreeBSD 9.3 and a jail created with it would stay a 9.3 jail.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Don't forget that iocage itself is still evolving... On the current release of FreeNASS 11.1u4, the iocage version is 1.0 Alpha. So, if one were to say there are still some "gotchas" then I would not be surprised.

I tried iocage back on FreeNAS 9.10 and had some problems with VNET. Tried again in v11.0 and had an issue with updating. Tried again in 11.1u4 and so far so good. Each version of iocage has gotten better. We'll have to wait and see if the next update goes smoothly.

I created my jails by hand rather than using the new FreeNAS interface. The new interface does see the jails, so I'm happy about that - but I don't have confidence yet in actually using the new interface. It is not difficult to set up and maintain iocage jails by hand, and iocage has lots of useful commands to help get all the settings just the way you want. And, yes, there are options for both updating the jails and upgrading them to new versions of FreeBSD.

To see the version of iocage you are running, go to the shell and enter
Code:
iocage -v
To see what version of FreeBSD the jails are configured with, run
Code:
iocage list
and it will generate a list of jails showing the FreeBSD version and IP address assigned. I don't think all the jails have to use the same version of FreeBSD (this is something you can designate when you create the jail.)

Note: if you search for iocage documentation, be certain you are using documentation for the latest version. There are quite a few posts of old documentation and comments about older versions - so be careful to use the most current.
 

mpfusion

Contributor
Joined
Jan 6, 2014
Messages
198
@Jailer Thank you very much for taking the time to test this. Great news that it's possible to upgrade iocage jails.
 

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
Hi All,
I am trying to upgrade my iocage jails to 11.2STABLE from 11.1-STABLE with the following command:
iocage upgrade 11.2-STABLE plex

src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 11.1-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
world/base world/doc world/lib32

The following components of FreeBSD do not seem to be installed:
world/base-dbg world/lib32-dbg


Fetching metadata signature for 11.2-STABLE from update1.freebsd.org... failed.
Fetching metadata signature for 11.2-STABLE from update4.freebsd.org... failed.
No mirrors remaining, giving up.

Any idea's why mirrors not being found?
 

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193

Tsaukpaetra

Patron
Joined
Jan 7, 2014
Messages
215
Sorry to resurrect this thread, but I'm running into an issue that I think can only be resolved from a nuke-n-pave on this jail.

I've migrated a warden-based jail a month or so ago and it's been running just fine, albeit at 9.2. Now, I want to get it on 11.2 like every other jail, but it's just arguing with me every step of the way.

First off, running iocage upgrade namp -r 11.2-RELEASE gives me some rather odd results:

Code:
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 9.2-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
world/base world/doc world/games world/lib32

The following components of FreeBSD do not seem to be installed:

Does this look reasonable (y/n)?


I answer yes and it downloads stuff, after which it decides that it can't merge some fifty config files or so. Inspecting the /new folder for the files it apparently intends to replace, they're all zero-byte files (something weird happened with the merge?), despite their replacements from the 11.2-RELEASE folder being fine.
Of course, since the merge leaves them empty I assume that when it asks for me to edit them and I leave them blank it will thus replace the working ones with the broken blank ones, right? So I decide to cancel the process.

Am I doing anything wrong? If not, and the system is truly borked for whatever reason, I suppose I'll just have to suck it up and finagle a fresh jail into shape, but I was hoping not to have to due to the long list of configured packages I have in it. ;)
 
Top