Iocage: How to truly obliterate a jail

Created on 19 Mar 2018  路  1Comment  路  Source: iocage/iocage

Iocage version: 0.9.10 2017/12/22

Trying to destroy a jail running uwsgi (which apparently is an unkillable zombie):

# iocage destroy -f www
Stopping www
Destroying www
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/destroy.py", line 128, in cli
    skip_jails=True).destroy_jail()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 758, in destroy_jail
    exit_on_error=self.exit_on_error).destroy_jail(path)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_destroy.py", line 210, in destroy_jail
    iocage.lib.ioc_stop.IOCStop(uuid, path, conf, silent=True)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_stop.py", line 52, in __init__
    self.__stop_jail__()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_stop.py", line 142, in __stop_jail__
    stdout=f, stderr=su.PIPE)
  File "/usr/local/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['setfib', '0', 'jexec', 'ioc-www', '/bin/sh', '/etc/rc.shutdown']' died with <Signals.SIGKILL: 9>.

Is it possible to utterly destroy an iocage jail in such a case?

question

Most helpful comment

Zombies are always fun :D

So you can take a hammer to this jail as follows:

jail -r JID (find this with jls)
umount the active mounts used from the jail
zfs destroy -fr POOL/iocage/jails/www

That should nuke it from orbit.

>All comments

Zombies are always fun :D

So you can take a hammer to this jail as follows:

jail -r JID (find this with jls)
umount the active mounts used from the jail
zfs destroy -fr POOL/iocage/jails/www

That should nuke it from orbit.

Was this page helpful?
0 / 5 - 0 ratings