Error exporting/disconnecting pools on TrueNAS 12.0

Description

I'm having problems exporting/disconnecting pools on TrueNAS 12.0. Basically, I can't do it.

This is what I first did:
1. Under Storage -> Pools I select Add and then "Create new pool" and click "CREATE POOL".
2. In the Pool Manager I gave the new pool a unique name, added two disks (mirror raid), and added both disks as Data VDevs. I then clicked "CREATE".
3. The pool was created and I can see it under Storage -> Pools.
4. Under Storage -> Pools I clicked the settings icon for my new pool, and selected "Export/Disconnect".
5. I got a pop-up message saying "Error exporting/disconnecting pool. no path specified" and when I clicked "More info..." I got this:

Error: Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 137, in call_method
result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self,
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1195, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 973, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/pool.py", line 1634, in attachments
return await self.middleware.call('pool.dataset.attachments_with_path', pool['path'])
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1238, in call
return await self._call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1195, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/pool.py", line 3714, in attachments_with_path
for attachment in await delegate.query(path, True):
File "/usr/local/lib/python3.8/site-packages/middlewared/common/attachment/_init_.py", line 97, in query
if await self.is_child_of_path(resource, path):
File "/usr/local/lib/python3.8/site-packages/middlewared/common/attachment/_init_.py", line 132, in is_child_of_path
return is_child(resource[self.path_field], path)
File "/usr/local/lib/python3.8/site-packages/middlewared/utils/path.py", line 11, in is_child
rel = os.path.relpath(child, parent)
File "/usr/local/lib/python3.8/posixpath.py", line 453, in relpath
raise ValueError("no path specified")
ValueError: no path specified

After asking for help on

https://www.truenas.com/community/threads/error-exporting-disconnecting-pools-on-truenas-12-0.90452/

I've saved the config, updated to 12.0-U1.1, restored the config, and I still can't export/disconnect.

After moving the System Dataset to another pool, now when I try to export/disconnect any pool I get he Error exporting/disconnecting pool." error message popup, and now the trace is much longer than before:

Error: Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 137, in call_method
result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self,
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1195, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 973, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/pool.py", line 1634, in attachments
return await self.middleware.call('pool.dataset.attachments_with_path', pool['path'])
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1238, in call
return await self._call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1195, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/pool.py", line 3714, in attachments_with_path
for attachment in await delegate.query(path, True):
File "/usr/local/lib/python3.8/site-packages/middlewared/common/attachment/_init_.py", line 94, in query
for resource in await self.middleware.call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1238, in call
return await self._call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1195, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 973, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/middlewared/service.py", line 442, in query
result = await self.middleware.call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1238, in call
return await self._call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1195, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 973, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/datastore/read.py", line 163, in query
result = await self._queryset_serialize(
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/datastore/read.py", line 213, in _queryset_serialize
result.append(await self._serialize(
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/datastore/read.py", line 229, in _serialize
data = await self.middleware.call(extend, data, extend_context_value)
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1238, in call
return await self._call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1195, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/service.py", line 602, in sharing_task_extend
data[self.locked_field] = await self.middleware.call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1238, in call
return await self._call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1195, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/service.py", line 591, in sharing_task_determine_locked
return await self.middleware.call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1238, in call
return await self._call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1206, in _call
return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1110, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
File "/usr/local/lib/python3.8/site-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/pool.py", line 2686, in path_in_locked_datasets
return any(is_child(path, d['mountpoint']) for d in locked_datasets if d['mountpoint'])
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/pool.py", line 2686, in <genexpr>
return any(is_child(path, d['mountpoint']) for d in locked_datasets if d['mountpoint'])
File "/usr/local/lib/python3.8/site-packages/middlewared/utils/path.py", line 11, in is_child
rel = os.path.relpath(child, parent)
File "/usr/local/lib/python3.8/posixpath.py", line 453, in relpath
raise ValueError("no path specified")
ValueError: no path specified

I also see this in /var/log/middlewared.log :

[2021/01/21 09:51:54] (DEBUG) middlewared.logger.CrashReporting.report():109 - Sending a crash report...
[2021/01/21 09:51:54] (DEBUG) urllib3.connectionpool._get_conn():266 - Resetting dropped connection: sentry.ixsystems.com
[2021/01/21 09:51:54] (DEBUG) urllib3.connectionpool._make_request():428 - https://sentry.ixsystems.com:443 "POST /api/2/store/ HTTP/1.1" 200 4

I've tried exporting/disconnecting on all my pools (both online and offline pools), but I get the same error for all of them.

I'm running out of space on my old pools (I'm way above 80%) and urgently need to rearrange my disks/pools but right now I'm stuck due to this. So for me the impact is critical...

Problem/Justification

None

Impact

None

is duplicated by

SmartDraw Connector

Katalon Manual Tests (BETA)

Activity

Show:

William Gryzbowski January 29, 2021 at 2:07 PM

Waqar Ahmed January 29, 2021 at 9:26 AM

Glad to hear it works. Thank you for checking it out.

January 28, 2021 at 8:13 PM

Hi Waqar, now everything seems to work. Changing

to

makes the export/disconnect pop-up appear instead of an error and a trace, and the pop-up warns about service dependencies relevant for the pool. I'll try tomorrow to actually go through with an export/disconnect and see what happens. If I encounter any problems I'll report them here.

Again, thanks!

Waqar Ahmed January 28, 2021 at 7:32 PM

can you please confirm if it's an issue now ? Thank you

January 28, 2021 at 7:24 PM

Yes Waqar tried it again, and unfortunately it makes things worse.

As far as I can see, the only difference is the keyword await on line 1336. Without await, exporting/disconnecting works. With await, exporting/disconnecting no longer works and instead gives this error when I click "More info..." in the "Error exporting/disconnecting pool. no path specified" pop up window:

Complete
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Impact

Medium

Affects versions

Priority

More fields

Katalon Platform

Created January 21, 2021 at 4:17 PM
Updated July 1, 2022 at 5:14 PM
Resolved January 29, 2021 at 2:07 PM