TN 12.0-U1 - Can't upgrade jail releases

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
So a few days ago, I upgraded my FreeNAS 11.3-Usomething (U4.1, I think) box to TN 12.0-U1. The upgrade was uneventful, jails are still working, shares are still working, etc. Then I thought it'd be good to upgrade my jails, so going through my list, I started running iocage upgrade -r 12.2-RELEASE <jailname> on them, one at a time. Of course, the iocage upgrade takes a while, so after four of them, I went to bed. The next day, running the same command won't work:
Code:
root@freenas2[~]# iocage upgrade -r 12.2-RELEASE emby
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 2070, in upgrade
    new_release = ioc_upgrade.IOCUpgrade(
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_upgrade.py", line 110, in upgrade_jail
    with urllib.request.urlopen(f) as fbsd_update:
  File "/usr/local/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/local/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/local/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/local/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

Trying it with 12.1-RELEASE gives the same result, as does 12.0-RELEASE. A little baffled here. Just to make sure I wasn't mis-typing something, or doing something different, I scrolled up in my shell history to pull the exact command I'd been using--still the same result. And today, a day later, I'm still seeing the same thing. Any ideas what's going on, or how to correct it?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
It's due to some changes going on at FreeBSD right now and hopefully should be sorted soon.
 

Jeren

Dabbler
Joined
Sep 14, 2013
Messages
26
Replying to this thread to mention the github link resolved the 404 issue I had
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
There's a workaround posted on github for iocage that is working.
The specified file doesn't appear to exist under TN 12.0-U1. It does with s/python3.7/python3.8/ though. However, the proposed fix results in a different error:
Code:
root@freenas11[~]# iocage upgrade -r 12.2-RELEASE caddy                                
Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 6, in <module>
    from iocage_cli import cli
  File "/usr/local/lib/python3.8/site-packages/iocage_cli/__init__.py", line 38, in <module>
    import iocage_lib.ioc_check as ioc_check
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_check.py", line 30, in <module>
    import iocage_lib.ioc_common
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_common.py", line 46, in <module>
    import iocage_lib.ioc_exec
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_exec.py", line 28, in <module>
    import iocage_lib.ioc_json
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_json.py", line 39, in <module>
    import iocage_lib.ioc_create
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_create.py", line 35, in <module>
    import iocage_lib.ioc_fstab
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_fstab.py", line 35, in <module>
    import iocage_lib.ioc_list
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_list.py", line 33, in <module>
    import iocage_lib.ioc_plugin
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_plugin.py", line 53, in <module>
    import iocage_lib.ioc_upgrade
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_upgrade.py", line 103
    f_rel = f'{self.new_release.split(".")[0]}'
    ^
IndentationError: unexpected indent


Edit: never mind, had one too many spaces in each pasted line of the patch. It seems to be running now.
 
Last edited:

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Edit: never mind, had one too many spaces in each pasted line of the patch. It seems to be running now.
Same thing happened to me when I copied and pasted the code so I just made the edits needed second time around.
 

warriorcookie

Explorer
Joined
Apr 17, 2017
Messages
67
Thanks for posting this. The github link fixed the 404 error for me too.
 
Top