Truenas core jail upgrade failed

Joined
Oct 22, 2019
Messages
3,641
Information about the jails and the iocage dataset:

Code:
iocage list -l

Code:
zfs list -r -t filesystem -o name,exec,readonly,usedds,avail pool/iocage
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
I have many jails running at 12.1-RELEASE to 12.3-RELEASE.Yesterday when I planned to upgrade them, I found various errors.
Code:
$ iocage upgrade -r 13.1 myJail
Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 12, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/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.9/site-packages/iocage_lib/iocage.py", line 2093, in upgrade
    new_release = ioc_upgrade.IOCUpgrade(
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_upgrade.py", line 139, in upgrade_jail
    iocage_lib.ioc_exec.InteractiveExec(
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_exec.py", line 307, in __init__
    su.run(
  File "/usr/local/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/local/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/tmp/tmp1izwn456'


The upgrade command I used is:
Code:
iocage upgrade -r 13.1 myJail


Before executing the jail upgrade,I have upgraded truenas core to the latest TrueNAS-13.0-U6.1

I looked through various information, but to no avail. And it seems like everyone has migrated to scale.

New jails can be created using command:
Code:
iocage create


Because the current jail version of pkg cannot be updated, I urgently need to perform an upgrade operation.

Did I do something wrong?Asking for your help, thank you all!
Do you have any snapshots of the jail? If so you can try doing a Rollback to the time prior to the upgrade. This should take you back to where you were prior to the upgrade.
 
Joined
Oct 22, 2019
Messages
3,641
Do any iocage commands work properly?
 

mamanizhenhao

Dabbler
Joined
Jan 7, 2024
Messages
14
OK!Thank you very much for everyone's help.

I reorganized it.

I discovered that there are different types of jails.

The jail type that reports errors when running upgrade is clone jail

The current situation is: the jail type I need to upgrade is clone jail.

My base jail upgrade command can be run successfully.



I checked some information and found that clone jail cannot be upgraded and can only be destroyed and rebuilt. But it's a big job for me.OMG!

How to upgrade clone jail?
 

mamanizhenhao

Dabbler
Joined
Jan 7, 2024
Messages
14
Do any iocage commands work properly?
iocage works. But some errors are thrown while executing specific command. Such as upgrading.

Currently, only upgrade is known to cause errors when executing iocage. Everything else is fine with other options.
 
Top