Details prior to trying to manually stop and remove contrainer:
I am in the process of migrating a couple of apps from using portainer to compose.yaml via an include file in the APPS UI. The first app went fine, but I was having problems accessing a dataset external to the container with the 2nd. I am using the digikam app with a modified port since this is not my primary digikam installation. I had it up and running, but I was testing my links to the dataset with pictures that I wanted the app to see. I went through about 3 cycles then I was unable to delete the app. Each time I was deleting the app completely using the truenas APPS UI. The compose.yaml was in a separate dataset (using an include command for installation).
include:
- /mnt/Main/app_storage/digislide/compose.yaml
The compose.yaml file is
services:
digikam:
image: lscr.io/linuxserver/digikam:latest
container_name: digislide
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- SUBFOLDER=/ #optional
volumes:
- /mnt/sixterra/digi-slide
ports:
- 3002:3002 #optional
- 3003:3003 #optional
restart: unless-stopped
I have restarted the system and now NO apps come up. I am now unable to unset or choose a pool.
/var/log/lifecycle.log:
Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/plugins/zfs_/dataset_actions.py", line 77, in umount
with libzfs.ZFS() as zfs:
File "libzfs.pyx", line 534, in libzfs.ZFS.__exit__
File "/usr/lib/python3/dist-packages/middlewared/plugins/zfs_/dataset_actions.py", line 79, in umount
dataset.umount(force=options['force'])
File "libzfs.pyx", line 4287, in libzfs.ZFSDataset.umount
libzfs.ZFSException: cannot unmount '/mnt/.ix-apps/docker': pool or dataset is busy
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.11/concurrent/futures/process.py", line 261, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 112, in main_worker
res = MIDDLEWARE._run(*call_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 46, in _run
return self._call(name, serviceobj, methodobj, args, job=job)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 34, in _call
with Client(f'ws+unix://{MIDDLEWARE_RUN_DIR}/middlewared-internal.sock', py_exceptions=True) as c:
File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 40, in _call
return methodobj(*params)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 183, in nf
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/zfs_/dataset_actions.py", line 82, in umount
raise CallError(f'Failed to umount dataset: {e}')
middlewared.service_exception.CallError: [EFAULT] Failed to umount dataset: cannot unmount '/mnt/.ix-apps/docker': pool or dataset is busy
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/plugins/docker/update.py", line 97, in do_update
await self.middleware.call('service.stop', 'docker')
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1629, in call
return await self._call(
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1460, in _call
return await methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 179, in nf
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 49, in nf
res = await f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/service.py", line 267, in stop
await service_object.after_stop()
File "/usr/lib/python3/dist-packages/middlewared/plugins/service_/services/docker.py", line 72, in after_stop
await self.mount_umount_ix_apps(False)
File "/usr/lib/python3/dist-packages/middlewared/plugins/service_/services/docker.py", line 19, in mount_umount_ix_apps
await self.middleware.call('zfs.dataset.umount', docker_ds, {'force': True})
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1629, in call
return await self._call(
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1468, in _call
return await self._call_worker(name, *prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1474, in _call_worker
return await self.run_in_proc(main_worker, name, args, job)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1380, in run_in_proc
return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1364, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
middlewared.service_exception.CallError: [EFAULT] Failed to umount dataset: cannot unmount '/mnt/.ix-apps/docker': pool or dataset is busy
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 509, in run
await self.future
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 554, in __run_body
rv = await self.method(*args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 49, in nf
res = await f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 179, in nf
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/docker/update.py", line 111, in do_update
raise CallError(f'Failed to stop docker service: {e}')
middlewared.service_exception.CallError: [EFAULT] Failed to stop docker service: [EFAULT] Failed to umount dataset: cannot unmount '/mnt/.ix-apps/docker': pool or dataset is busy
The last time I had to do anything close to this I used k3s kubernetes commands. How can I delete the busy container?
System:
ElectricEel-24.10.2.3
2 Pools:
1 x RAIDZ1 | 4 wide | 7 TiB
1 x MIRROR | 2 wide | 5.46 TiB
PC
ASRock B550M Pro4 w/6 SATA
AMD Ryzen 5 3600
64 Gb memory Kingston FURY Beast 64GB (4x16GB) 3200MHz DDR4 CL16 Desktop Memory Kit of 4 KF432C16BBK4/64,Black
Isolated GPU Device(s): NVIDIA Corporation TU106 [GeForce RTX 2070]
APPS
damselfly
digikam
Nextcloud
homeassistant
SHARES
SMB shares - One on each pool
ADDENDUM:
As luck has it… I’m reading a book on DOCKER. Here’s what I did to manually stop and remove the container:
docker ps | grep digislide
…
It’s there
docker stop digislide
…
It stops
docker rm digislide
…
It’s gone
Unset pool <ok>
Choose pool <ok>
Apps come up BUT when I try to delete the trouble app in the UI it’s back to
[EFAULT] Failed 'down' action for 'digislide' app. Please check /var/log/app_lifecycle.log for more details
If this is a dupe I apologize; did not find it if it is.
Thanks!