Hints to gui for errors when deleting a jail after upgrade to 11.2

Status
Not open for further replies.

dmshimself

Dabbler
Joined
Mar 20, 2017
Messages
41
Hi - I've been running 11.2 since the 5th Dec with the released version and overall things have been excellent. Very impressed. I've been tidying up a few loose ends and one issue is a jail that shows up as corrupt cannot be deleted. No errors shows, it just doesn't get deleted. With the cli, when I do a delete I get the following error at the end.

OSError: [Errno 30] Read-only file system: '/mnt/iocage/templates/dhcpdjail/tmpziki_lw2'

In the gui, if I edit this area and make it read/write, I can then delete the jail fine in the gui.

Perhaps any errors on the delete could be presented to the gui so action can be taken?
 

Walki2000

Cadet
Joined
Dec 12, 2018
Messages
3
I have the same issue. The Jail is corrupted and detaching is not possible.
syncthing is missing it's configuration, please destroy this jail and recreate it.
Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_json.py", line 254, in json_load
jail_dataset.properties["org.freebsd.iocage:host_hostuuid"]
File "libzfs.pyx", line 2059, in libzfs.ZFSPropertyDict.__getitem__
KeyError: 'org.freebsd.iocage:host_hostuuid'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 128, in main_worker
res = loop.run_until_complete(coro)
File "/usr/local/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 88, in _run
return await self._call(f'{service_name}.{method}', serviceobj, methodobj, params=args, job=job)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
return methodobj(*params)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
return methodobj(*params)
File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 668, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 551, in stop
iocage.stop()
File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 1679, in stop
conf = ioc_json.IOCJson(path, silent=self.silent, stop=True
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_json.py", line 270, in json_load
exception=ioc_exceptions.JailMissingConfiguration)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 81, in logit
_callback(content, exception)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 64, in callback
raise callback_exception(message)
iocage_lib.ioc_exceptions.JailMissingConfiguration: syncthing is missing it's configuration, please destroy this jail and recreate it.
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 161, in call_method
result = await self.middleware.call_method(self, message)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1109, 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 1046, in _call
return await self._call_worker(serviceobj, name, *args)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1073, in _call_worker
job,
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1004, in run_in_proc
return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 989, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
iocage_lib.ioc_exceptions.JailMissingConfiguration: syncthing is missing it's configuration, please destroy this jail and recreate it.

When I now want to delete the Jail I got a message "Jail deleted" but it is still there and of course corrupted.
 

dmshimself

Dabbler
Joined
Mar 20, 2017
Messages
41
Your situation may be different, but what I did was from the FreeNAS menu start a shell and then
iocage list

identify the correct jail from it's name/whatnot/whatever it is, then

iocage stop <whatever it is>

You may get errors if it isn't started, then

iocage destroy <whatever it is>

Like me you may get further errors which need to be identified and corrected. In my case I got a clear error that a dataset was readonly. That I could fix up in the gui and repeat the destroy. In my case also I had dependant snapshots, so I needed to do a recursive destroy.
 

Devilstompa

Dabbler
Joined
Nov 7, 2018
Messages
42
I get a warden error
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Status
Not open for further replies.
Top