Middleware fatal error when saving Samba share after updating to 12
Description
Problem/Justification
Impact
SmartDraw Connector
Katalon Manual Tests (BETA)
Activity
Then I don't understand.
I clean installed using a downloaded ISO of 12-beta from the main website download link, written to USB as an installer. (SHA256 = 8cec75863935ac5706f15024dea6650f2f7736b738beb6bfd5da01a2995763c2, I think that was the one??).
I've never "hacked" the code other than to work around a config upload issue for 2 bugfixes in github not in my system, as suggested on the forums and here.
It's not possible I used a hot patch or patched version, because I haven't had any link for the ISO except the main website 12-beta download link until now. Hence why I wanted the official nightlies to recheck. I don't understand what's happened.
I do have one question on the nightlies.
Is "12.1" a shorthand for the next stage from 12-beta1 towards the next beta or rc? I always figured 12.1 meant literally, the repo for what would become TrueNAS 12.1 some time in early 2021. Is it in fact the next pre-release of 12.0? I'm confused about the naming. Could this be clarified in the github .MD files?
The same commit that I quoted is also the one that added changed the behavior of smb.reg_showshare() to return None if the share does not exist. The only way this could be causing your SMB server to have issues on BETA1 is if you partially applied the commit to a BETA1 server (mistake while hotpatching). If this is the case, please do not file bug reports against the hot-patched version.
You can download nightlies for 12.1 here: https://download.freenas.org/12.1/MASTER/
Test in a VM and not your production server.
@Andrew Walker - the build Ive got is 12-BETA, but it doesnt have this commit dated 2 July, which adds the code you're quoting.
It's got the code from before then, seen in this version, which lacks that check (and the other big changes in that commit). It's not patched, thats just the code in the build, nothing Ive done.
So I can't tell if the bug is fixed for me or not. It looks like it should be. It would be nice to be sure.
The problem is, I cant find where to download an ISO build of the current 12.0 post-BETA1 nightly with the fixes since end June in them.
I've asked, nobody's answered.
Can you help, so I can test if the current codebase fixes the issue for me?
Thanks.
We explicitly check for whether this function returns None. Are you using a nightly? Is this a hot-patched server?
if diff is None:
await self.middleware.call('sharing.smb.reg_addshare', new)
A quick question, was this in fact addressed, one way or another? If so, can the PR be linked?
If not addressed yet, can this bug status be reopened, just so we track it until it's fixed properly? Now that its confirmed what the issue is (if not what the correct fix is)
tl;dr - whats the status? Thanks!
I have a samba share with pre-existing ACLs. I had to edit the share, and it of course refused to save because it (correctly) detected ACLs in use. I checked the "Enable ACLs" checkbox, clicked Save again, and got an unspecified error and traceback.
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 1187, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/service.py", line 457, in update
rv = await self.middleware._call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1187, 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/smb.py", line 743, in do_update
diff = await self.middleware.call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1229, in call
return await self._call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1187, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/smb_/registry.py", line 172, in diff_middleware_and_registry
reg_conf = await self.reg_showshare(share if not data['home'] else 'homes')
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/smb_/registry.py", line 78, in reg_showshare
net = await self.netconf(action='showshare', share=share)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/smb_/registry.py", line 46, in netconf
raise CallError(
middlewared.service_exception.CallError: [EFAULT] net conf showshare [User_files_(Main)] failed with error: