iocage manager is broken

scdhh

Cadet
Joined
Jan 23, 2022
Messages
8
My iocage suddenly stopped working after a reboot
No matter what I do it outputs the following error
Code:
truenas% iocage --version
Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 6, in <module>
    from iocage_cli import cli
  File "/usr/local/lib/python3.9/site-packages/iocage_cli/__init__.py", line 38, in <module>
    import iocage_lib.ioc_check as ioc_check
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_check.py", line 30, in <module>
    import iocage_lib.ioc_common
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_common.py", line 46, in <module>
    import iocage_lib.ioc_exec
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_exec.py", line 28, in <module>
    import iocage_lib.ioc_json
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_json.py", line 39, in <module>
    import iocage_lib.ioc_create
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_create.py", line 35, in <module>
    import iocage_lib.ioc_fstab
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_fstab.py", line 57, in <module>
    LIBC = load_ctypes_library(
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/utils.py", line 10, in load_ctypes_library
    raise ImportError('No library named %s' % name)
ImportError: No library named c
 

scdhh

Cadet
Joined
Jan 23, 2022
Messages
8
I'm not sure if I should go to iocage's github and ask because I don't even know the version of iocage (
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
I'm not sure if I should go to iocage's github and ask because I don't even know the version of iocage (
iocage -v
Version 1.2

Is your pool imported correctly?
Is iocage assigned to that pool ?
In the pool in read-only ?
 

scdhh

Cadet
Joined
Jan 23, 2022
Messages
8
iocage -v
Version 1.2

Is your pool imported correctly?
Is iocage assigned to that pool ?
In the pool in read-only ?
iocage -v will also report an error
Pool is in normal state
jail is even working
But I can't use anything about iocage
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
If your jail setup is complex then export the jails and move the created files from Images to a location outside of Iocage.
Then try an : iocage clean -all
to remove iocage.
If that fails with a traceback then I would delete the iocage dataset after stopping all the jails and then reboot and recreate iocage assigning it to the pool you want. Fetch the Releases you need then move the saved jails back to Images and import them and re-establish the mounts if needed.

That is what I would try, but it is not without risk and I would ensure you have a good backup !!!

Edit : If that all fails then recreate your boot media, test for functionality and if ok then import the last saved config and test again.
 
Last edited:

scdhh

Cadet
Joined
Jan 23, 2022
Messages
8
If your jail setup is complex then export the jails and move the created files from Images to a location outside of Iocage.
Then try an : iocage clean -all
to remove iocage.
If that fails with a traceback then I would delete the iocage dataset after stopping all the jails and then reboot and recreate iocage assigning it to the pool you want. Fetch the Releases you need then move the saved jails back to Images and import them and re-establish the mounts if needed.

That is what I would try, but it is not without risk and I would ensure you have a good backup !!!

Edit : If that all fails then recreate your boot media, test for functionality and if ok then import the last saved config and test again.
Apparently I can't use iocage clean(
I think it might work to reinstall iocage, but I don't know how to do it
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
Iocage is created on first use when it is assigned to a pool.
Have you exported your jails and tried to delete the iocage dataset ?
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177

scdhh

Cadet
Joined
Jan 23, 2022
Messages
8
So where are you now ?
I want to try reinstalling truenas
But I want to try truenas scale, I don't know if the backup configuration is universal
But at least the pool should be imported correctly, right?
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
Top