SOLVED Cannot export pool with U3

CHL

Dabbler
Joined
Apr 20, 2014
Messages
11
When trying to export a pool in U3, the following Error occurs here:

---snip
Error exporting/disconnecting pool.
'NoneType' object has no attribute 'split'
---snap

To reproduce, just select "Export/Disconnect" - maybe some of you can confirm this? Additional info: all my pools are encrypted

In Detail:

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 1646, 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 3766, in attachments_with_path
for attachment in await delegate.query(path, True):
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/s3_/attachments.py", line 21, in query
if query_dataset in (s3_ds, s3_ds.split('/')[0]) or query_dataset.startswith(f'{s3_ds}/'):
AttributeError: 'NoneType' object has no attribute 'split'
 

SteveGBuck

Cadet
Joined
May 11, 2021
Messages
3
Confirmed I'm getting the same error. Just upgraded a FreeNAS 11.3 U5 system to TrueNAS-12.0.-U3.1 and my first task was to export pools but getting this error on both of my 2 pools. (one encrypted, one is not).

Just seeing if I can find a bug report for this anywhere...
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
I have the same error message with a missing pool on U3, unable to disconnect.
If your pool is already "missing" do you actually have a zombie pool? ... here's how to fix that: https://www.truenas.com/community/threads/deleting-a-zombie-pool.90592/

This is not the solution for the OP's problem. (and additionally if the OP's problem is common to all, the process would also be broken as it uses a GUI export at the end... you may need to wait for a subsequent update if it turns out to be a bug)
 

SteveGBuck

Cadet
Joined
May 11, 2021
Messages
3
In my case the issue was that I had an old S3 config referring to a dataset I had deleted ages ago. Even though the S3 service was disabled it was still causing this error.

To workaround, I edited the S3 config to use any existing dataset, saved the settings and it let me export my pools with no further issue.
 

digity

Contributor
Joined
Apr 24, 2016
Messages
156
To workaround, I edited the S3 config to use any existing dataset, saved the settings and it let me export my pools with no further issue.

Thanks! Had this error for days when trying to remove pools or datasets. S3 service was pointing to a pool that no longer existed. Changed the S3 directory to a current dataset. S3 was actually not running, so I enabled it and then disabled it again for safe measure (to make sure the settings change populated). I can now remover pools without that error.
 

CHL

Dabbler
Joined
Apr 20, 2014
Messages
11
yes - thank you for this. I just overlooked this S3 thing... my fault. But I don't use S3 any longer - so how to clear these settings for S3 completely? Currently I have to point to an existing folder I don't need and an "empty" field is not allowed in the GUI. Not a big thing, but any ideas?
 

markelvy

Cadet
Joined
Jul 4, 2021
Messages
1
The AttributeError is an exception thrown when an object does not have the attribute you tried to access. ‘NoneType’ object has no attribute ‘split’ often indicates that the attribute you are trying to python split is Null, meaning there is no value in it to split. So, you need to check the attribute is not Null before splitting. Something like…

if val is not None:
# ...
 

Niel Archer

Dabbler
Joined
Jun 7, 2014
Messages
28
In my case the issue was that I had an old S3 config referring to a dataset I had deleted ages ago. Even though the S3 service was disabled it was still causing this error.

To workaround, I edited the S3 config to use any existing dataset, saved the settings and it let me export my pools with no further issue.
Where do you edit the s3 config? I have tried editing from the service page, but it will not let me save any changes.
 
Top