Could not remove mount point from Jail

Status
Not open for further replies.

don_sangiorgio

Dabbler
Joined
Jul 21, 2018
Messages
11
Hi all,

I'm on FreeNAS-11.2-BETA3, and I have an issue with my nextcloud Jail.
I tried adding a mount point to it for sharing files between SMB and nextcloud, but since the new GUI doesn't show an option to create a new directory, I ended up with an error when I wanted to start my jail, stating that it wouldn't start because there is no such directory.

No worries, I thought, let's just delete the mount point, but...
When I try to delete it, it just doesn't want to! The mount point remains in the list.

I tried the legacy gui, but in there for some reason, I can't even see my jails.

Anyone have any ideas? Because now my jail is down, and that's a real problem :-/

Thanks in advance,
Alex
 
D

dlavigne

Guest
It is expected that you can't see the jails in the legacy UI as it only recognizes warden jails made in 11.1 or earlier versions. 11.2 jails use the iocage backend and new middleware instead.

wrt the mount point, it should automatically create the directory for you if it doesn't already exist. What's the exact error messages in /var/log/messages? If there aren't any related entries there, are there any in /var/log/middlewared.log?
 

don_sangiorgio

Dabbler
Joined
Jul 21, 2018
Messages
11
No related entries is /V/L/M, but there are in middlewared.log
Code:
[2018/09/12 05:59:54] (WARNING) application.call_method():182 - Exception while calling jail.fstab(*['nextcloud', {'action': 'REMOVE', 'index': 14}])
concurrent.futures.process._RemoteTraceback: 
"""
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 122, 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 82, 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 75, in _call
	return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 75, 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 555, in fstab
	dump, _pass, index=index)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 973, in fstab
	if len(destination) > 88:
TypeError: object of type 'NoneType' has no len()
"""

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 155, in call_method
	result = await self.middleware.call_method(self, message)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1033, 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 970, in _call
	return await self._call_worker(serviceobj, name, *args)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 997, in _call_worker
	job,
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 928, 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 913, in run_in_executor
	return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
TypeError: object of type 'NoneType' has no len()
[2018/09/12 05:59:54] (DEBUG) middlewared.logger.CrashReporting.report():102 - Sending a crash report...
[2018/09/12 05:59:54] (DEBUG) raven.base.Client.send_remote():716 - Sending message of length 3150 to https://sentry.ixsystems.com/api/2/store/



At the end of the file, you can see the event. Any workarounds possible?
 

Amsoil_Jim

Contributor
Joined
Feb 22, 2016
Messages
175
you can manually remove mount points in the command line

if you run this with your jail name inserted it will give you a list with an index number
Code:
iocage fstab -l jailname

example:
Code:
 iocage fstab -l Plex
+-------+--------------------------------------------------------------------------+
| INDEX |							   FSTAB ENTRY								|
+=======+==========================================================================+
| 0	 | /mnt/Media/apps/plex /mnt/iocage/jails/Plex/root/config nullfs rw 0 0	|
+-------+--------------------------------------------------------------------------+
| 1	 | /mnt/Media/movies /mnt/iocage/jails/Plex/root/media/movies nullfs ro 0 0 |
+-------+--------------------------------------------------------------------------+
| 2	 | /mnt/Media/music /mnt/iocage/jails/Plex/root/media/music nullfs ro 0 0   |
+-------+--------------------------------------------------------------------------+
| 3	 | /mnt/Media/series /mnt/iocage/jails/Plex/root/media/series nullfs ro 0 0 |
+-------+--------------------------------------------------------------------------+


then run this code with the index number in place of "index"
Code:
iocage fstab -r jailname index

example:
Code:
iocage fstab -r Plex 0
 

don_sangiorgio

Dabbler
Joined
Jul 21, 2018
Messages
11
you can manually remove mount points in the command line

if you run this with your jail name inserted it will give you a list with an index number
Code:
iocage fstab -l jailname

example:
Code:
 iocage fstab -l Plex
+-------+--------------------------------------------------------------------------+
| INDEX |							   FSTAB ENTRY								|
+=======+==========================================================================+
| 0	 | /mnt/Media/apps/plex /mnt/iocage/jails/Plex/root/config nullfs rw 0 0	|
+-------+--------------------------------------------------------------------------+
| 1	 | /mnt/Media/movies /mnt/iocage/jails/Plex/root/media/movies nullfs ro 0 0 |
+-------+--------------------------------------------------------------------------+
| 2	 | /mnt/Media/music /mnt/iocage/jails/Plex/root/media/music nullfs ro 0 0   |
+-------+--------------------------------------------------------------------------+
| 3	 | /mnt/Media/series /mnt/iocage/jails/Plex/root/media/series nullfs ro 0 0 |
+-------+--------------------------------------------------------------------------+


then run this code with the index number in place of "index"
Code:
iocage fstab -r jailname index

example:
Code:
iocage fstab -r Plex 0
Excellent!! Many thanks! Should look up what I can do with iocage in the future.
I'll make a bug report, and submit the ticket here.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
FYI: I have had good luck managing iocage jails manually. It is not difficult, and the new user interface still has some issues getting everything just right. There is quite a bit of documentation about managing iocage jails - just be careful to use the latest documentation.

Iocage is really a nice upgrade from Warden and FreeNAS will be much better off with it.
 

PatarNoster

Cadet
Joined
Nov 26, 2015
Messages
9
Hey
you can manually remove mount points in the command line

if you run this with your jail name inserted it will give you a list with an index number
Code:
iocage fstab -l jailname

example:
Code:
 iocage fstab -l Plex
+-------+--------------------------------------------------------------------------+
| INDEX |							   FSTAB ENTRY								|
+=======+==========================================================================+
| 0	 | /mnt/Media/apps/plex /mnt/iocage/jails/Plex/root/config nullfs rw 0 0	|
+-------+--------------------------------------------------------------------------+
| 1	 | /mnt/Media/movies /mnt/iocage/jails/Plex/root/media/movies nullfs ro 0 0 |
+-------+--------------------------------------------------------------------------+
| 2	 | /mnt/Media/music /mnt/iocage/jails/Plex/root/media/music nullfs ro 0 0   |
+-------+--------------------------------------------------------------------------+
| 3	 | /mnt/Media/series /mnt/iocage/jails/Plex/root/media/series nullfs ro 0 0 |
+-------+--------------------------------------------------------------------------+


then run this code with the index number in place of "index"
Code:
iocage fstab -r jailname index

example:
Code:
iocage fstab -r Plex 0

Hey Mate,

On the above, do you know a way to get the jail to start with the mounts? Eg the dir did not exist so used mkdir in jail but jail still wont start.

Any ideas?
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Have you read the iocage documentation? Iocage has its own commands for managing settings, including networking parameters and mount points. I would not use the UI at this time.
 
Status
Not open for further replies.
Top