Incorrect parent check when unlocking encrypted dateset

Description

I have two encypted datesets tank/enc and tank/enctest. If both are locked, unlocking enctest fails with the following trackback:

Error: Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 361, in run
await self.future
File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 399, in __run_body
rv = await self.middleware.run_in_thread(self.method, *([self] + args))
File "/usr/local/lib/python3.8/site-packages/middlewared/utils/run_in_thread.py", line 10, in run_in_thread
return await self.loop.run_in_executor(self.run_in_thread_executor, 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/schema.py", line 977, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/pool.py", line 2210, in unlock
raise CallError(f'{id} has locked parents {",".join(locked_datasets)} which must be unlocked first')
middlewared.service_exception.CallError: [EFAULT] tank/enctest has locked parents tank/enc which must be unlocked first

It works fine if the dataset name does not start with the name of a locked dataset.

Problem/Justification

None

Impact

None

SmartDraw Connector

Katalon Manual Tests (BETA)

Activity

Show:

Bug Clerk 
August 11, 2020 at 5:15 PM

Bug Clerk 
August 1, 2020 at 1:28 PM

Complete

Details

Assignee

Reporter

Impact

Components

Affects versions

Priority

More fields

Katalon Platform

Created July 26, 2020 at 6:31 AM
Updated July 1, 2022 at 4:51 PM
Resolved August 11, 2020 at 5:15 PM