Updating iocage jail release (11.2 => 11.2 Updates)

rmccullough

Patron
Joined
May 17, 2018
Messages
269
I originally installed FreeNAS 11.2 BETA2, and have since upgraded to BETA3 and RC1. However, my jails are still showing a release of "11.2-RELEASE-p2". I have seen in some other threads people talking about "11.2-RELEASE-p4". Do I need to update my release? If so, how is this done? Am I safe to update the release of an existing jail, or would I need to create a new jail if I wanted to take advantage of something in the new release?
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Today, I updated a system from 11.1-U6 to 11.2-RC2. The update went OK. But be patient, it takes a few minutes to download and install everything.

My iocage jails, created manually when I was in 11.1, showed up in the new interface just fine. Of course, since they were originally created with 11.1, they stayed at 11.1 after the FreeNAS update. I tried upgrading one of them to 11.2 through the new FreeNAS GUI, and it updated OK. But be patient, it takes a few minutes to download and install everything.

Here is the procedure to upgrade the jail: 1) Stop the jail, 2) Edit jail properties to change the version and select 11.2-RELEASE (currently -p4) from the drop down menu, 3) Restart jail.

If you are running some version of FreeNAS 11.2, you should probably update to -RC2. Once -RC2 is installed, you should be able to update the jail from the jail manager in the GUI.
 

Drew Heath

Explorer
Joined
Mar 7, 2016
Messages
80
Is 11.2-RELEASE-p4 the current version? How do we check that? I recall after updating I had to run a command to fetch a new version before it would show up in the GUI. Will the GUI now show the latest version available for download?
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
How do you set 11.2 as the default for new jails? When I go to create a new jail the latest version I can select is 11.1.

Edit: I ended up rebooting the server and its now showing up.

Although I did notice that the current version is now 11.2-RELEASE-p7. But when I attempt to upgrade my existing iocage jails which are currently at 11.2-RELEASE-p4 it fails to download with the following error.

Code:
iocage upgrade -r 11.2-RELEASE-p7 Plex
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 11.2-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata patches.. done.
Applying metadata patches... 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-RELEASE-p7 from update1.freebsd.org... failed.
Fetching metadata signature for 11.2-RELEASE-p7 from update4.freebsd.org... failed.
Fetching metadata signature for 11.2-RELEASE-p7 from update2.freebsd.org... failed.
No mirrors remaining, giving up.
Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 10, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/iocage_cli/upgrade.py", line 39, in cli
    ioc.IOCage(jail=jail, skip_jails=True).upgrade(release)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 1827, in upgrade
    root_path).upgrade_jail()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_upgrade.py", line 116, in upgrade_jail
    raise RuntimeError("Error occured, jail not upgraded!")
RuntimeError: Error occured, jail not upgraded!

 
Last edited:

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
@raidflex have you managed to figure this out? Today I installed a new FreeNAS server for testing purposes and I just created a jail. I see that the release is listed at 11.2-RELEASE-p9 while my production FreeNAS server is at 11.2-RELEASE-p4.

If there any way to get the jail on my production server upgraded from p4 to p9?
 
Last edited:

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
The new GUI in 11.2 provides a way to update jails. However, you cannot have a jail with OS version that is newer than the "installed" version. If your production server is at p4, then that is the latest version supported by the jails. Perhaps, the new test server you built is using FreeNAS 11.2-u1.
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
Well both my production and test server are running FreeNAS-11.2-RELEASE-U1. I did install my production server with RC1 a couple months ago and then upgraded. So I'm confused why the jail versions aren't the same.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
FreeNAS updates do not automatically update jails. This is by design, and there is a good reason for it. Therefore, if you originally built your production server with 11.2-RC1 and created jails, after you updated the server to 11.2-RELEASE-U1 the jails would have remained at the version of FreeBSD that was installed when they were originally created.

You can update jails through the GUI by going to the Jails manager. Either select the jail and run update, or click on the jail options (three dots at the right side of the screen) and choose update from the drop-down menu.
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
I tried updating the jail using the method you described, for example, I updated my Transmission jail. But it still shows up at p4 in the table. Also when I create a new jail it still shows with p4.
 

rmccullough

Patron
Joined
May 17, 2018
Messages
269
I am seeing the exact same behavior as @Mannekino describes.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
I have tried to update my Plex jail today. This was originally a warden jail from "years back" and converted to an iocage jail. It's presently showing to be on 10.3.
1550098638047.png

I followed the update instructions and selected the latest release, but the update failed.
I tried again with a couple more releases "just for fun": 10.4 and 11.1. Both attempts also failed.

Error messages in all cases were identical - see below.

Code:
Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 128, in main_worker
    res = loop.run_until_complete(coro)
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 88, in _run
    return await self._call(f'{service_name}.{method}', serviceobj, methodobj, params=args, job=job)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 668, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 773, in upgrade
    IOCUpgrade(conf, release, root_path).upgrade_jail()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_upgrade.py", line 116, in upgrade_jail
    raise RuntimeError("Error occured, jail not upgraded!")
RuntimeError: Error occured, jail not upgraded!
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/middlewared/job.py", line 332, in run
    await self.future
  File "/usr/local/lib/python3.6/site-packages/middlewared/job.py", line 356, in __run_body
    rv = await self.middleware._call_worker(self.serviceobj, self.method_name, *self.args, job={'id': self.id})
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1073, in _call_worker
    job,
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1004, in run_in_proc
    return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 989, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
RuntimeError: Error occured, jail not upgraded!


Any ideas?
 

rmccullough

Patron
Joined
May 17, 2018
Messages
269
@Redcoat I think your post is probably off-topic for this thread, which is about upgrading jails created on 11.2 to an updated version of 11.2. You may have better luck creating a new thread.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
@rmccullough, I'll take your advice - but I note that the thread title you gave it gives no clue to the distinctiion you draw...
 

rmccullough

Patron
Joined
May 17, 2018
Messages
269
Fair point, I will update it.
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
@rmccullough so are we experiencing a bug or am I doing something wrong? When I ran the pkg update and pkg upgrade last week in my Transmission jail it did do an update but it still shows p4. After the update I lost some of my Transmission settings such as the download directory which I had to re-configure using the sysrc command.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
When I ran the pkg update and pkg upgrade last week in my Transmission jail it did do an update but it still shows p4
That only updates the packages in the jail. If the update button isn't working for you file a bug report. I tried the update button in the GUI on my 11.2 system and it worked as expected so something is broken on your system.
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
What does the update button in the GUI actually do? When I press it I immediately get a notification on the bottom that the jail had been updated. but as you said doesn't seem to do anything, I thought it would run the commands I mentioned above.

I will file a bug report later today. Maybe I should reinstall my FreeNAS server when 11.2-U2 comes out. Wouldn't be that much of a hassle for me to do.
 
Last edited:

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Filing a bug report is definitely the thing to do. I don't have any plans to update to 11.2-U1 so I'm not running the exact same version as you.

As a point of fact, I don't automatically update every time a new release is available. Usually, I skip every other update, unless there is an enhancement or bug fix that addresses a concern I have. I do have a couple of issues that I am watching for, but my system is running well right now.
 
Top