Issue with migrating Warden to Iocage

xaser

Dabbler
Joined
Mar 8, 2020
Messages
34
Hi all,

I ran the script to migrate my jail from Warden to Iocage to get with the times (the jail is configured to have a VPN connection in front of Sabnzbd/sickrage/couchpotato).

I get the following message when I run the script and the jail doesn't seem to be migrated:

root@freenas:~ # migrate_warden.py -v -j sabnzbd_1 -p tank2
-- Migrating: sabnzbd_1 --
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/iocage_cli/create.py", line 164, in cli
basejail=basejail, thickjail=thickjail, empty=empty)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 611, in create
clone=clone,
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_create.py", line 8 7, in create_jail
return self._create_jail(jail_uuid, location)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_create.py", line 1 94, in _create_jail
config = self.create_config(jail_uuid, cloned_release)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_create.py", line 5 74, in create_config
jail_props = ioc_json.json_check_default_config()
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_json.py", line 192 4, in json_check_default_config
self.json_write(default_props, default_json_location)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_json.py", line 431 , in json_write
if template else None
File "libzfs.pyx", line 645, in libzfs.ZFS.get_dataset_by_path
libzfs.ZFSException: Dataset with path not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/iocage", line 10, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __ca ll__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in inv oke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invo ke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invo ke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/iocage_cli/create.py", line 184, in cli
"message": err
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 9 0, in logit
_callback(content, exception)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 6 4, in callback
raise callback_exception(message)
RuntimeError: Dataset with path not found
Traceback (most recent call last):
File "/usr/local/sbin/migrate_warden.py", line 442, in <module>
loop.run_until_complete(main(sys.argv[1:], loop))
File "/usr/local/lib/python3.6/asyncio/base_events.py", line 484, in run_until _complete
return future.result()
File "/usr/local/sbin/migrate_warden.py", line 432, in main
await Migrate(jail, _dir, iocage_pool, verbose, loop).migrate_jail()
File "/usr/local/sbin/migrate_warden.py", line 217, in migrate_jail
self.create_jail(props, iocroot)
File "/usr/local/sbin/migrate_warden.py", line 329, in create_jail
su.check_call(cmd, stdout=su.PIPE)
File "/usr/local/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['iocage', 'create', '-n', 'sabnzbd_1', '-e', 'notes=warden_id=1', 'allow_raw_sockets=1', 'vnet=on', 'ip4_addr=vnet0|192 .168.0.2/24', 'ip6_addr=none', 'vnet0_mac=02ffb000060b,02ffb000060c', 'defaultro uter=none', 'defaultrouter6=none']' returned non-zero exit status 1.

Any ideas?

Thanks!
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,175
Dataset with path not found
I would say that iocage is not configured correctly.
If you have no iocage jails then remove iocage "iocage clean -a", and recreate it in the pool. In the new gui : jails - settings and assign the pool for iocage.
Iocage list should run without a traceback.
 

xaser

Dabbler
Joined
Mar 8, 2020
Messages
34
Thanks - that fixed it.

Unfortunately, after the migration finished, the jail is working properly.

As noted above, the jail contains a VPN with Sabnzbd/sickrage etc behind it. While the jail is "up" in the GUI, with the right ip address (192.168.0.2/24). when I go to 192.168.0.2/Sabnzbd which is how I had the routing configured in the old jail, it does not work. I also confirmed that the jail is running using the iocage list command and it shows that it is up as well (the release is 10.3 which is correct - it is an old jail). Also, the iocage list -P command doesn't show any plugins installed in the jail, nor are any plugins listed in the GUI (they are listed in the legacy GUI under the Warden jail).

Any ideas?
 
Last edited:

xaser

Dabbler
Joined
Mar 8, 2020
Messages
34
I think I am getting REALLY close.

I unchecked "VNET" in the jail and everything worked! However, once I restarted the NAS to make sure stuff is still working after a restart, it looks like the GUI took over the 192.168.0.2 IP address (it is listed as another IP address for accessing the web user interface after the NAS boots) and I can no longer access my jail/plugins. At least I know that the jail is working, I just have to tweak the network configuration and unfortunately, I am not sure what the issue is - any ideas?

Thanks so much!
 

Thousandbuckle

Contributor
Joined
Jul 9, 2014
Messages
136
Hi Alecmascot, hoping you can help me out. I successfully upgraded from FreeNAS 11.2 U8 to FreeNAS 11.3 but then quickly realized that the Warden Jails were not longer supported and could not get back to the Legacy Interface. So I rolled back to my working 11.2 U8 boot environment and all seemed fine until when I noticed the 2 iOCage jails I had previously running were no longer showing in the Jails page (see screen shot). My Warden jails are back now but for some reason all of my iOcage jails are just gone. If I hit the Add button to create a new iOcage jail I get the error text and images below. The Volume is activated and I can still see my iOCage datasets.

My question to you I guess is if I follow your recommendation to run "iocage clean -a" , can I create a snaphsot of my current working iOCage jail while I am booted into 11.3, then reboot back into 11.2, run your command ""iocage clean -a", then boot back into 11.3 and restore my iOCage snapshots?

Error I get when booted in 11.2 after I did the upgrade to 11.3 and rolled back to 11.2

Error: Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 166, in call_method
result = await self.middleware.call_method(self, message)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1093, in call_method
return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1037, in _call
return await self._call_worker(name, *args)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1058, in _call_worker
return await self.run_in_proc(main_worker, name, args, job)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 990, in run_in_proc
return await async_run_in_executor(loop, executor, method, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/utils/asyncio_.py", line 41, in async_run_in_executor
raise result
libzfs.ZFSException: ('Dataset with path not found',)
 

Attachments

  • 5.jpg
    5.jpg
    96.3 KB · Views: 158
  • 4.jpg
    4.jpg
    46.7 KB · Views: 171

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,175
My question to you I guess is if I follow your recommendation to run "iocage clean -a" , can I create a snaphsot of my current working iOCage jail while I am booted into 11.3, then reboot back into 11.2, run your command ""iocage clean -a", then boot back into 11.3 and restore my iOCage snapshots?
Thoughts as they occur to me:
It's probably worth a try. From the second image it seems that the "releases" dataset is missing ?
If you do a clean, all of iocage is removed and you will have to recreate it in the pool before you restore the snapshots.

Do you not have snapshots in 11.2 that you can use to restore iocage in 11.2 ?
I wonder if you boot to 11.3 that the iocage jails will still be gone.
Is it not easier just to recreate them ?
 
Top