iocage fetching in TrueNAS-12.0-U1

trubble

Cadet
Joined
Sep 4, 2015
Messages
3
I'm in the process of migrating from a existing hardware (running 12.0-U1) to new hardware. I have successfully migrated existing plugins/jails and pool data.

When attempting to create any new plugin, I'm am seeing the following error: Error: Jail: <jailname> has a missing configuration, please check that the dataset is mounted.

When I attempt to create a standalone jail, I get the following:
Code:
Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_create.py", line 325, in _create_jail
    su.check_call(['zfs', 'snapshot', dataset], stderr=su.PIPE)
  File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['zfs', 'snapshot', 'Pool1/iocage/releases/12.2-RELEASE/root@qbittorrent']' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 361, in run
    await self.future
  File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 399, in __run_body
    rv = await self.middleware.run_in_thread(self.method, *([self] + args))
  File "/usr/local/lib/python3.8/site-packages/middlewared/utils/run_in_thread.py", line 10, in run_in_thread
    return await self.loop.run_in_executor(self.run_in_thread_executor, functools.partial(method, *args, **kwargs))
  File "/usr/local/lib/python3.8/site-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 977, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/jail_freebsd.py", line 887, in do_create
    err, msg = iocage.create(
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/iocage.py", line 603, in create
    ioc_create.IOCCreate(
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_create.py", line 100, in create_jail
    return self._create_jail(jail_uuid, location)
  File "/usr/local/lib/python3.8/site-packages/iocage_lib/ioc_create.py", line 331, in _create_jail
    raise RuntimeError(
RuntimeError: RELEASE: 12.2-RELEASE not found!


Output from iocage list -r:
[CODE}
root@truenas[~]# iocage list -r
+---------------+
| Bases fetched |
+===============+
+---------------+
[/CODE]

Fetching latest:
Code:
root@truenas[~]# iocage fetch -r LATEST

Fetching: 12.2-RELEASE

Extracting: base.txz...
Extracting: lib32.txz...
Extracting: src.txz...

* Updating 12.2-RELEASE to the latest patch level...
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 12.2-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.
The following files will be updated as part of updating to
12.2-RELEASE-p2:
/bin/freebsd-version
/lib/libcrypto.so.111
/rescue/[
/rescue/bectl
/rescue/bsdlabel
/rescue/bunzip2
/rescue/bzcat
/rescue/bzip2
/rescue/camcontrol
/rescue/cat
/rescue/ccdconfig
/rescue/chflags
/rescue/chgrp
/rescue/chio
/rescue/chmod
/rescue/chown
/rescue/chroot
/rescue/clri
/rescue/cp
/rescue/csh
/rescue/date
/rescue/dd
/rescue/devfs
/rescue/df
/rescue/dhclient
/rescue/disklabel
/rescue/dmesg
/rescue/dump
/rescue/dumpfs
/rescue/dumpon
/rescue/echo
/rescue/ed
/rescue/ex
/rescue/expr
/rescue/fastboot
/rescue/fasthalt
/rescue/fdisk
/rescue/fsck
/rescue/fsck_4.2bsd
/rescue/fsck_ffs
/rescue/fsck_msdosfs
/rescue/fsck_ufs
/rescue/fsdb
/rescue/fsirand
/rescue/gbde
/rescue/geom
/rescue/getfacl
/rescue/glabel
/rescue/gpart
/rescue/groups
/rescue/gunzip
/rescue/gzcat
/rescue/gzip
/rescue/halt
/rescue/head
/rescue/hostname
/rescue/id
/rescue/ifconfig
/rescue/init
/rescue/ipf
/rescue/iscsictl
/rescue/iscsid
/rescue/kenv
/rescue/kill
/rescue/kldconfig
/rescue/kldload
/rescue/kldstat
/rescue/kldunload
/rescue/ldconfig
/rescue/less
/rescue/link
/rescue/ln
/rescue/ls
/rescue/lzcat
/rescue/lzma
/rescue/md5
/rescue/mdconfig
/rescue/mdmfs
/rescue/mkdir
/rescue/mknod
/rescue/more
/rescue/mount
/rescue/mount_cd9660
/rescue/mount_msdosfs
/rescue/mount_nfs
/rescue/mount_nullfs
/rescue/mount_udf
/rescue/mount_unionfs
/rescue/mt
/rescue/mv
/rescue/nc
/rescue/newfs
/rescue/newfs_msdos
/rescue/nos-tun
/rescue/pgrep
/rescue/ping
/rescue/ping6
/rescue/pkill
/rescue/poweroff
/rescue/ps
/rescue/pwd
/rescue/rcorder
/rescue/rdump
/rescue/realpath
/rescue/reboot
/rescue/red
/rescue/rescue
/rescue/restore
/rescue/rm
/rescue/rmdir
/rescue/route
/rescue/routed
/rescue/rrestore
/rescue/rtquery
/rescue/rtsol
/rescue/savecore
/rescue/sed
/rescue/setfacl
/rescue/sh
/rescue/shutdown
/rescue/sleep
/rescue/spppcontrol
/rescue/stty
/rescue/swapon
/rescue/sync
/rescue/sysctl
/rescue/tail
/rescue/tar
/rescue/tcsh
/rescue/tee
/rescue/test
/rescue/tunefs
/rescue/umount
/rescue/unlink
/rescue/unlzma
/rescue/unxz
/rescue/unzstd
/rescue/vi
/rescue/whoami
/rescue/xz
/rescue/xzcat
/rescue/zcat
/rescue/zdb
/rescue/zfs
/rescue/zpool
/rescue/zstd
/rescue/zstdcat
/rescue/zstdmt
/sbin/ipfw
/sbin/rtsol
/usr/include/openssl/asn1err.h
/usr/lib/libcrypto.a
/usr/lib/libcrypto_p.a
/usr/lib32/libcrypto.a
/usr/lib32/libcrypto.so.111
/usr/lib32/libcrypto_p.a
/usr/sbin/rtsold
/usr/share/zoneinfo/Africa/Algiers
/usr/share/zoneinfo/Africa/Casablanca
/usr/share/zoneinfo/Africa/El_Aaiun
/usr/share/zoneinfo/America/Dawson
/usr/share/zoneinfo/America/Whitehorse
/usr/share/zoneinfo/Antarctica/Casey
/usr/share/zoneinfo/Antarctica/Macquarie
/usr/share/zoneinfo/Asia/Gaza
/usr/share/zoneinfo/Asia/Hebron
/usr/share/zoneinfo/Canada/Yukon
/usr/share/zoneinfo/Europe/Budapest
/usr/share/zoneinfo/Europe/Monaco
/usr/share/zoneinfo/Europe/Paris
/usr/share/zoneinfo/Pacific/Fiji
/usr/src/contrib/tzdata/Makefile
/usr/src/contrib/tzdata/NEWS
/usr/src/contrib/tzdata/README
/usr/src/contrib/tzdata/africa
/usr/src/contrib/tzdata/antarctica
/usr/src/contrib/tzdata/asia
/usr/src/contrib/tzdata/australasia
/usr/src/contrib/tzdata/backzone
/usr/src/contrib/tzdata/europe
/usr/src/contrib/tzdata/leap-seconds.list
/usr/src/contrib/tzdata/leapseconds
/usr/src/contrib/tzdata/leapseconds.awk
/usr/src/contrib/tzdata/northamerica
/usr/src/contrib/tzdata/southamerica
/usr/src/contrib/tzdata/theory.html
/usr/src/contrib/tzdata/version
/usr/src/contrib/tzdata/ziguard.awk
/usr/src/contrib/tzdata/zishrink.awk
/usr/src/contrib/tzdata/zoneinfo2tdf.pl
/usr/src/crypto/openssl/crypto/asn1/asn1_err.c
/usr/src/crypto/openssl/crypto/asn1/tasn_dec.c
/usr/src/crypto/openssl/crypto/asn1/tasn_enc.c
/usr/src/crypto/openssl/crypto/err/openssl.txt
/usr/src/crypto/openssl/crypto/x509v3/v3_genn.c
/usr/src/crypto/openssl/include/openssl/asn1err.h
/usr/src/sbin/ipfw/dummynet.c
/usr/src/sbin/ipfw/ipfw2.c
/usr/src/sbin/ipfw/nat64lsn.c
/usr/src/sbin/ipfw/tables.c
/usr/src/sys/amd64/linux/linux_machdep.c
/usr/src/sys/amd64/linux32/linux32_machdep.c
/usr/src/sys/arm64/linux/linux_machdep.c
/usr/src/sys/compat/freebsd32/freebsd32_misc.c
/usr/src/sys/conf/newvers.sh
/usr/src/sys/i386/linux/linux_machdep.c
/usr/src/sys/kern/kern_exec.c
/usr/src/sys/kern/kern_timeout.c
/usr/src/sys/kern/subr_syscall.c
/usr/src/sys/netinet6/icmp6.c
/usr/src/usr.sbin/rtsold/rtsol.c
Installing updates...Scanning /mnt/Pool1/iocage/releases/12.2-RELEASE/root/usr/share/certs/blacklisted for certificates...
Scanning /mnt/Pool1/iocage/releases/12.2-RELEASE/root/usr/share/certs/trusted for certificates...
 done.


Again, output from iocage list -r:
[CODE}
root@truenas[~]# iocage list -r
+---------------+
| Bases fetched |
+===============+
+---------------+
[/CODE]

Not sure what I'm missing and would appreciate any direction from the community.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Have you tried iocage activate? Just guessing, sorry. I might be off-track.
 

trubble

Cadet
Joined
Sep 4, 2015
Messages
3
I appreciate the assist. I have tried iocage activate per another post but that did not seem to make a difference.

I did attempt to create jails using different releases. 12.2 and 12.1 failed as per above. However, I was able to create a jail with 11.4-RELEASE witch performed a fetch during jail creation and that now shows in iocage list:
Code:
root@truenas[~]# iocage list -r
+---------------+
| Bases fetched |
+===============+
| 11.4-RELEASE  |
+---------------+


Which is progress, I guess. Still unable to create a plugin and fetches on later releases appear successful but do not show in the iocage list.
 

trubble

Cadet
Joined
Sep 4, 2015
Messages
3
Ok, not sure what happened - must have borked something in the data transfer. I've removed the 12.1-RELEASE and 12.2-RELEASE folders from /iocage/releases and performed another fetch. They are now showing in the iocage list:
Code:
root@truenas[~]# iocage list -r
+---------------+
| Bases fetched |
+===============+
| 11.4-RELEASE  |
+---------------+
| 12.1-RELEASE  |
+---------------+
| 12.2-RELEASE  |
+---------------+

Thank for the quick assist, Patrick!
 
Top