Truenas core jail upgrade failed

mamanizhenhao

Dabbler
Joined
Jan 7, 2024
Messages
14
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!
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
13.1 is long EOL. Try 13.2.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I've also never seen it as an option to omit RELEASE in the release name
iocage upgrade -r 13.1 myJail
should be:
iocage upgrade -r 13.2-RELEASE myJail
 

mamanizhenhao

Dabbler
Joined
Jan 7, 2024
Messages
14
I've also never seen it as an option to omit RELEASE in the release name

should be:
iocage upgrade -r 13.2-RELEASE myJail
Thanks for the suggestion, but it still doesn't work.
This is the execution result
Code:
$ iocage upgrade -r 13.2-RELEASE 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/tmpalgj8wpi'
 

mamanizhenhao

Dabbler
Joined
Jan 7, 2024
Messages
14
13.1 is long EOL. Try 13.2.
Thanks for the suggestion, but it still doesn't work.
This is the execution result.
Code:
$ iocage upgrade -r 13.2-RELEASE 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/tmpalgj8wpi'
 

mamanizhenhao

Dabbler
Joined
Jan 7, 2024
Messages
14
I'm confused about this and think this shouldn't be the case since I successfully updated these jails using this method last year.I even suspected that there was a problem with my system. So I tried a fresh install in a VM to test.

I equipped the test virtual machine with a boot disk and five hard drives to form a new test pool.
Fresh installation, set root password, booted, created new pool with Raid-z2, created new jail using new pool, created 13.2—Release was very successful. But if I choose to create 12.4-Release and choose to upgrade to 13.2-Release using the command, he also reports the same error, or even worse.It will first report an SSL error about Python, and running after turning off certificate verification will report the same error as the theme.

I was very curious about this, so I looked into it a little deeper.

After repeatedly installing VM, I found that after running the upgrade command in TrueNAS-13.0-U6.1 and reporting an error, and using various methods to upgrade the boot disk and migrate to Truenas scale cobia, strange python errors were reported when installing various applications.The solution is to completely erase the boot disk and perform a fresh installation. (Data in the pool is not affected)
 

mamanizhenhao

Dabbler
Joined
Jan 7, 2024
Messages
14
I'm confused about this and think this shouldn't be the case since I successfully updated these jails using this method last year.I even suspected that there was a problem with my system. So I tried a fresh install in a VM to test.

I equipped the test virtual machine with a boot disk and five hard drives to form a new test pool.
Fresh installation, set root password, booted, created new pool with Raid-z2, created new jail using new pool, created 13.2—Release was very successful. But if I choose to create 12.4-Release and choose to upgrade to 13.2-Release using the command, he also reports the same error, or even worse.It will first report an SSL error about Python, and running after turning off certificate verification will report the same error as the theme.

I was very curious about this, so I looked into it a little deeper.

After repeatedly installing VM, I found that after running the upgrade command in TrueNAS-13.0-U6.1 and reporting an error, and using various methods to upgrade the boot disk and migrate to Truenas scale cobia, strange python errors were reported when installing various applications.The solution is to completely erase the boot disk and perform a fresh installation. (Data in the pool is not affected)
Replenish:
No jail upgrade error was triggered before upgrading to Truenas scale. The application installation function after upgrading to Truenas scale is completely normal.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
TrueNAS SCALE does not support jails. Plain and simple.
 
Joined
Oct 22, 2019
Messages
3,641
Thanks for the suggestion, but it still doesn't work.
Did you first fetch the release? If you never fetched it, then there's nothing to upgrade.

Code:
iocage fetch -r 13.2-RELEASE


You can even just use iocage fetch without any parameters for an interactive method.
 

mamanizhenhao

Dabbler
Joined
Jan 7, 2024
Messages
14
Did you first fetch the release? If you never fetched it, then there's nothing to upgrade.

Code:
iocage fetch -r 13.2-RELEASE


You can even just use iocage fetch without any parameters for an interactive method.
Thank you for your reply!

Every time I perform an upgrade, I will first ensure that the required version of fetch is executed correctly.
But the problem remains···········
I'm almost desperate about this.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
So you are on an unaltered CORE system and the jail upgrade fails? Which version of CORE?
 
Joined
Oct 22, 2019
Messages
3,641
But the problem remains···········
So to recap:
  1. You're on the latest version of TrueNAS Core (are you?)
  2. You successfully fetched, via "iocage fetch", 13.2-RELEASE
  3. You still cannot upgrade the jail with "iocage upgrade -r 13.2-RELEASE"

What version of TrueNAS Core are you running?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Did you first fetch the release? If you never fetched it, then there's nothing to upgrade.
The iocage upgrade command will fetch the release if it's not present on the system.
 

mamanizhenhao

Dabbler
Joined
Jan 7, 2024
Messages
14
So to recap:
  1. You're on the latest version of TrueNAS Core (are you?)
  2. You successfully fetched, via "iocage fetch", 13.2-RELEASE
  3. You still cannot upgrade the jail with "iocage upgrade -r 13.2-RELEASE"

What version of TrueNAS Core are you running?
The answer to all the above questions is yes

I used TrueNAS-13.0-U6.1
 
Joined
Oct 22, 2019
Messages
3,641
The iocage upgrade command will fetch the release if it's not present on the system.
Then I have a hunch they're on an older version of TrueNAS Core (i.e, 12.x).


EDIT: After going through this thread again, I'm more confused.

How many systems are there? A VM to test Core 13.0-U6.1? And the original system running... which version? And now there's SCALE in the mix?

You also "upgraded the boot disk". Why?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776

mamanizhenhao

Dabbler
Joined
Jan 7, 2024
Messages
14
Then I have a hunch they're on an older version of TrueNAS Core (i.e, 12.x).


EDIT: After going through this thread again, I'm more confused.

How many systems are there? A VM to test Core 13.0-U6.1? And the original system running which version? And now there's SCALE in the mix?

You also "upgraded the boot disk". Why?
I don't know if my description is not accurate enough.

My production equipment is using the latest TrueNAS-13.0-U6.1

The truenas core in the virtual machine mentioned in the thread is a new test environment only used to test jail upgrades. It has nothing to do with the production environment.

There is only one device in the production environment from beginning to end. Running version TrueNAS-13.0-U6.1.

There are 6 jails in this production equipment. The versions of these jails are 12.1-RELEASE to 12.3-RELEASE.
 

mamanizhenhao

Dabbler
Joined
Jan 7, 2024
Messages
14
My thoughts exactly. 我的想法完全正确。
屏幕截图 2024-01-08 225112.png

I feel like I’m not a person who just comes to others for help when I have a problem.
Unless you really try it and it really doesn’t work.
 
Top