Upgrade iocage jail to current OS release fails

-fun-

Contributor
Joined
Oct 27, 2015
Messages
171
Hi All,

after availability of iocage I migrated all my jails to iocage from iohyve. This was before the UI could handle this.

I had created all jails on the 11.1 release. After FreeNAS moved to 11.2 I found I could have the jails listed in the UI now but not migrate them to a current release. This does not work from the command line either. This fails:

iocage upgrade <jailname> -r 11.2-RELEASE

This is a problem, because some software in my jails is long outdated but updates are not compatible with the 11.1 release.

Has anyone experienced the same problem?

Or is there any advice which would help work around the problem (apart from setting up new jails from scratch, which is an obvious workaround I very urgently want to avoid).

Complete description of the problem is here:

https://redmine.ixsystems.com/issues/78834

Unfortunately the migration of the ticket to Jira does not seem to have pushed this.
It seems not to have high priority (priority 'low', 'unscreened', affects versions: 'none', resolution: 'unresolved', ...). Also the ticket description in Jira more or less just refers to the old ticket without any own description of the issue.

https://jira.ixsystems.com/browse/NAS-101143

-fun-
 
Joined
Jan 18, 2017
Messages
524
I spent three hours(shamefully) googling and fighting to update my 10.3 warden jail to 11.2 in iocage, the migration scripted worked acceptable but I got stuck where you are with similar errors. Did you use the migration script? If you run the following command in the jail do the versions match?
Code:
freebsd-version ; uname -mrs
 

-fun-

Contributor
Joined
Oct 27, 2015
Messages
171
Code:
root@unger:~ # iocage exec unifi freebsd-version
11.1-RELEASE-p15
root@unger:~ # iocage exec unifi uname -mrs
FreeBSD 11.2-STABLE amd64


Do you ask whether I did run a migration script to create my iocage scripts from old warden jails originally? Honestly, I don't remember, but I don't believe so.

Several people on the forum report such upgrades to work in their cases, so it's not completely broken. I seem to be not enough people for research of this is worth the effort. :smile:
 
Joined
Jan 18, 2017
Messages
524
Hmmm well in that case what I don't know if it will help you, the version mismatch I expected mine did that every time I attempted the upgrade and I set it back to the correct version within the jail
Code:
setenv UNAME_r "<11.1-RELEASE>"

and check in /mnt/<your pool>/iocage/jails/<your jail>/config.json to make sure the line
Code:
"release":
has the correct version
 

-fun-

Contributor
Joined
Oct 27, 2015
Messages
171
Tried that, no success. :-( Thanks nonetheless.

Code:
root@unger:~ # iocage upgrade -r 11.2-RELEASE unifi
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 11.1-RELEASE from update4.freebsd.org... failed.
Fetching metadata signature for 11.1-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:
src/src 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 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.
Fetching files from 11.1-RELEASE for merging... done.
Preparing to download files... done.
Fetching 43401 patches.....10....20....30....40
....50....60....70....80....90....100....110....120....130....140 done.
Applying patches... done.
Fetching 46857 files... ....10... failed.
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 1805, 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!
 
Joined
Jan 18, 2017
Messages
524
if you run iocage fetch -r 11.2-RELEASE on the host does the download fail?
 
Top