iocage broke in 11.0-U1 & U2. Cannot start jails

Status
Not open for further replies.

scrappy

Patron
Joined
Mar 16, 2017
Messages
347
After upgrading to FreeNAS 11.0-U1 something about iocage broke on my system. Even on 11.0-U2 iocage is not working. I have already filed a bug report on this issue, but in the meantime I was wondering if there is a way to start iocage created jails without using the iocage command?

This is what currently happens when I try to start one of my iocage jails:
Code:
root@megadoomer:/mnt/tank # iocage start NextCloud
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py", line 544, in json_check_config
  release = conf["release"]
KeyError: 'release'

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 __call__
  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 invoke
  return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
  return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
  return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/iocage/cli/start.py", line 32, in cli
  ioc.IOCage(jail, rc=rc).start()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 68, in __init__
  self.jails, self._paths = self.list("uuid")
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 468, in list
  return ioc_list.IOCList(lst_type, header, long, sort).list_datasets()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_list.py", line 53, in list_datasets
  conf = iocage.lib.ioc_json.IOCJson(jail).json_load()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py", line 256, in json_load
  conf = self.json_check_config(conf, version)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py", line 548, in json_check_config
  freebsd_version = f"{iocroot}/releases/{conf['release']}" \
KeyError: 'release'
root@megadoomer:/mnt/tank #

 

scrappy

Patron
Joined
Mar 16, 2017
Messages
347
D

dlavigne

Guest
Looks like it will be fixed in the next version of iocage. Any particular reason you can't use the iocage CLI for now?
 

scrappy

Patron
Joined
Mar 16, 2017
Messages
347
Looks like it will be fixed in the next version of iocage. Any particular reason you can't use the iocage CLI for now?

Well, because of this:
Code:
root@megadoomer:~ # iocage start NextCloud
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py", line 544, in json_check_config
  release = conf["release"]
KeyError: 'release'

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 __call__
  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 invoke
  return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
  return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
  return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/iocage/cli/start.py", line 32, in cli
  ioc.IOCage(jail, rc=rc).start()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 68, in __init__
  self.jails, self._paths = self.list("uuid")
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 468, in list
  return ioc_list.IOCList(lst_type, header, long, sort).list_datasets()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_list.py", line 53, in list_datasets
  conf = iocage.lib.ioc_json.IOCJson(jail).json_load()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py", line 256, in json_load
  conf = self.json_check_config(conf, version)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py", line 548, in json_check_config
  freebsd_version = f"{iocroot}/releases/{conf['release']}" \
KeyError: 'release'
root@megadoomer:~ #



I got my feet wet with jails by using iocage on FreeBSD, so this is pretty much all I know when it comes to jail management. Until this problem gets resolved, is there a direct way of starting and stopping jails originally created by iocage? Perhaps jexec or something?
 
D

dlavigne

Guest
Gotcha. So, is this a freshly installed iocage jail or had you been using it for awhile but now can't start it?

Do you have an issue if you create a new iocage jail? If so, paste the exact command you use to create the new iocage jail.
 

scrappy

Patron
Joined
Mar 16, 2017
Messages
347
They are not totally new jails, but fairly recent. I created them while on FreeNAS 11.0-RELEASE. They worked until the 11.0-U1 update and remain broken on 11.0-U2.

No matter what option(s) I use while attempting to create a new jail I still get the same KeyError message. In the code below I tried to create most simplistic jail based on the iocage docs. Normally I would assign a jail name and ip address but they also produce the same error.
Code:
root@megadoomer:~ # iocage create -r 11.0-RELEASE
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py", line 544, in json_check_config
  release = conf["release"]
KeyError: 'release'

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 __call__
  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 invoke
  return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
  return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
  return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/iocage/cli/create.py", line 86, in cli
  err, msg = ioc.IOCage().create(release, props, pkglist=pkglist,
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 68, in __init__
  self.jails, self._paths = self.list("uuid")
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 468, in list
  return ioc_list.IOCList(lst_type, header, long, sort).list_datasets()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_list.py", line 53, in list_datasets
  conf = iocage.lib.ioc_json.IOCJson(jail).json_load()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py", line 256, in json_load
  conf = self.json_check_config(conf, version)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py", line 548, in json_check_config
  freebsd_version = f"{iocroot}/releases/{conf['release']}" \
KeyError: 'release'
root@megadoomer:~ #


I think my problem is similar to this github issue.
 
D

dlavigne

Guest
They are not totally new jails, but fairly recent. I created them while on FreeNAS 11.0-RELEASE. They worked until the 11.0-U1 update and remain broken on 11.0-U2.

No matter what option(s) I use while attempting to create a new jail I still get the same KeyError message. In the code below I tried to create most simplistic jail based on the iocage docs. Normally I would assign a jail name and ip address but they also produce the same error.
Code:
root@megadoomer:~ # iocage create -r 11.0-RELEASE
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py", line 544, in json_check_config
  release = conf["release"]
KeyError: 'release'

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 __call__
  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 invoke
  return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
  return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
  return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/iocage/cli/create.py", line 86, in cli
  err, msg = ioc.IOCage().create(release, props, pkglist=pkglist,
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 68, in __init__
  self.jails, self._paths = self.list("uuid")
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 468, in list
  return ioc_list.IOCList(lst_type, header, long, sort).list_datasets()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_list.py", line 53, in list_datasets
  conf = iocage.lib.ioc_json.IOCJson(jail).json_load()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py", line 256, in json_load
  conf = self.json_check_config(conf, version)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py", line 548, in json_check_config
  freebsd_version = f"{iocroot}/releases/{conf['release']}" \
KeyError: 'release'
root@megadoomer:~ #


I think my problem is similar to this github issue.

Please add all of your last comment (quoted here) to https://bugs.freenas.org/issues/24521 so that the developer is aware. Thanks!
 
Status
Not open for further replies.
Top