Univention Bugzilla – Bug 53711
"WARNING: The "blocking locks" option is deprecated" caused by shares created in UCS4.4
Last modified: 2022-03-23 10:15:02 CET
We removed the deprecated option "blocking locks" with #49898. After an update, this produces the following warning on each univention-s4search (or any other ldbadd, ldbsearch etc.) "WARNING: The "blocking locks" option is deprecated" This has no functional implications, but it lead some of our tests to fail and it might unsettle some costumers.
We should remove sambaBlockingLocks from UDM shares/share: management/univention-directory-manager-modules/modules/univention/admin/handlers/shares/share.py:mapping.register('sambaBlockingLocks', 'univentionShareSambaBlockingLocks', None, univention.admin.mapping.ListToString) management/univention-directory-manager-modules/modules/univention/admin/handlers/shares/share.py: 'sambaBlockingLocks': univention.admin.property( management/univention-directory-manager-modules/modules/univention/admin/handlers/shares/share.py: ['sambaLocking', 'sambaBlockingLocks'], management/univention-directory-manager-modules/modules/univention/admin/handlers/shares/share.py:mapping.register('sambaBlockingLocks', 'univentionShareSambaBlockingLocks', None, univention.admin.mapping.ListToString) We should remove the evaluation in the listener: services/univention-samba/samba-shares.py: ('univentionShareSambaBlockingLocks', 'blocking locks'), services/univention-samba4/samba-shares.py: ('univentionShareSambaBlockingLocks', 'blocking locks'), Also all references in: test/ucs-test-tools/usr/share/ucs-test-tools/customer5000.ldif Adjust the test cases: test/ucs-test/tests/53_samba-common/61_share_hacking: 'univentionShareSambaBlockingLocks': ['1'], test/ucs-test/tests/64_udm-shares/01_create_fileshare: 'univentionShareSambaBlockingLocks': [properties['sambaBlockingLocks']], test/ucs-test/tests/64_udm-shares/02_create_fileshare_and_connect_via_samba: 'univentionShareSambaBlockingLocks': [properties['sambaBlockingLocks']], test/ucs-test/tests/53_samba-common/10samba-share-options:sambaBlockingLocks/blocking locks/1 test/ucs-test/tests/64_udm-shares/01_create_fileshare: 'sambaBlockingLocks': random.choice(['0', '1']), test/ucs-test/tests/64_udm-shares/01_create_fileshare: 'univentionShareSambaBlockingLocks': [properties['sambaBlockingLocks']], test/ucs-test/tests/64_udm-shares/02_create_fileshare_and_connect_via_samba: 'sambaBlockingLocks': random.choice(['0', '1']), test/ucs-test/tests/64_udm-shares/02_create_fileshare_and_connect_via_samba: 'univentionShareSambaBlockingLocks': [properties['sambaBlockingLocks']],
After removing this from the listener modules we should add a condition into the joinscript, which checks if there are shares with that option set and if yes, trigger a listener-resync of the listener module.
Re: Comment 1: > We should remove the evaluation in the listener: > services/univention-samba/samba-shares.py: ('univentionShareSambaBlockingLocks', 'blocking locks'), > services/univention-samba4/samba-shares.py: ('univentionShareSambaBlockingLocks', 'blocking locks'), That's been done already in UCS 5, see https://git.knut.univention.de/univention/ucs/-/commit/1be1a7061d
A simple "/usr/sbin/univention-directory-listener-ctrl resync samba-shares" after the upgrade to UCS 5.0 is enough to fix the problem.
The listener.log contains: 02.09.21 08:08:33.245 LISTENER ( ERROR ) : could not set nt acl for dir /home/testou3565/groups/testou3565-v556ga (lpcfg_do_service_parameter: WARNING: The "blocking locks" option is deprecated lpcfg_do_service_parameter: WARNING: The "blocking locks" option is deprecated lpcfg_do_service_parameter: WARNING: The "blocking locks" option is deprecated lpcfg_do_service_parameter: WARNING: The "blocking locks" option is deprecated lpcfg_do_service_parameter: WARNING: The "blocking locks" option is deprecated lpcfg_do_service_parameter: WARNING: The "blocking locks" option is deprecated lpcfg_do_service_parameter: WARNING: The "blocking locks" option is deprecated lpcfg_do_service_parameter: WARNING: The "blocking locks" option is deprecated lpcfg_do_service_parameter: WARNING: The "blocking locks" option is deprecated lpcfg_do_service_parameter: WARNING: The "blocking locks" option is deprecated lpcfg_do_service_parameter: WARNING: The "blocking locks" option is deprecated lpcfg_do_service_parameter: WARNING: The "blocking locks" option is deprecated )
# grep 'blocking locks' /var/log/univention/listener.log | wc -l 3533
cba992486e16af37d2d6770264d17df8b2889e15 - univention-updater * resync samba-shares too did not re-build the packages, i guess it is not necessary if we only want to change the postup for 5.0-0 copied to /mnt/build-storage/buildsystem/mirror/testing/dists/ucs500 -> updates-test.knut.univentio.de and signed with repo-ng-sign-release-file -i postup.sh.new -o postup.sh.new.gpg -k 8321745BB32A82C75BBD4BC2D293E501A055F562 -p /etc/archive-keys/ucs5.0.txt QA ucr set repository/online/server='updates-test.knut.univention.de' please re-open after QA for the final release of the file
OK: updater.log: Custom postupdate script /var/lib/local-postup.sh not found Object modified: cn=master206,cn=dc,cn=computers,dc=autotest206,dc=local running univention-directory-listener-ctrl resync udm_extension ldap_extension samba-shares listener shutdown done univention-run-join-scripts: runs all join scripts existing on local computer. OK: rgrep 'blocking' /etc/samba/ ~FAIL?!: listener.log: 07.09.21 10:38:56.665 LISTENER ( WARN ) : initializing module samba-shares Multifile: /etc/samba/smb.conf Multifile: /etc/samba/smb.conf Traceback (most recent call last): File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 293, in handler new_aces = set(sum([re.findall(re_ace, acl) for acl in new['univentionShareSambaBaseDirAppendACL']], [])) File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 293, in <listcomp> new_aces = set(sum([re.findall(re_ace, acl) for acl in new['univentionShareSambaBaseDirAppendACL']], [])) File "/usr/lib/python3.7/re.py", line 223, in findall return _compile(pattern, flags).findall(string) TypeError: cannot use a string pattern on a bytes-like object 07.09.21 10:38:59.994 LISTENER ( WARN ) : handler: samba-shares (failed) Traceback (most recent call last): File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 293, in handler new_aces = set(sum([re.findall(re_ace, acl) for acl in new['univentionShareSambaBaseDirAppendACL']], [])) File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 293, in <listcomp> new_aces = set(sum([re.findall(re_ace, acl) for acl in new['univentionShareSambaBaseDirAppendACL']], [])) File "/usr/lib/python3.7/re.py", line 223, in findall return _compile(pattern, flags).findall(string) TypeError: cannot use a string pattern on a bytes-like object 07.09.21 10:39:00.615 LISTENER ( WARN ) : handler: samba-shares (failed) Traceback (most recent call last): File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 293, in handler new_aces = set(sum([re.findall(re_ace, acl) for acl in new['univentionShareSambaBaseDirAppendACL']], [])) File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 293, in <listcomp> new_aces = set(sum([re.findall(re_ace, acl) for acl in new['univentionShareSambaBaseDirAppendACL']], [])) File "/usr/lib/python3.7/re.py", line 223, in findall return _compile(pattern, flags).findall(string) TypeError: cannot use a string pattern on a bytes-like object 07.09.21 10:39:01.301 LISTENER ( WARN ) : handler: samba-shares (failed) 07.09.21 10:39:01.305 LISTENER ( WARN ) : finished initializing module samba-shares with rv=0
This is Bug #53458 - let's just put univention-samba4 also into the UCS@school repo.
TODO: sed -i '/univentionShareSambaBlockingLocks/d' test/ucs-test-tools/usr/share/ucs-test-tools/customer5000.ldif I think we can for now leave the UDM modules as they are, and open a new bug to remove the properties (along with others) when 4.4 is out of maintenance.
(In reply to Florian Best from comment #9) > ~FAIL?!: listener.log: > 07.09.21 10:38:56.665 LISTENER ( WARN ) : initializing module > samba-shares > Multifile: /etc/samba/smb.conf > Multifile: /etc/samba/smb.conf > Traceback (most recent call last): > File "/usr/lib/univention-directory-listener/system/samba-shares.py", line > 293, in handler > new_aces = set(sum([re.findall(re_ace, acl) for acl in > new['univentionShareSambaBaseDirAppendACL']], [])) > File "/usr/lib/univention-directory-listener/system/samba-shares.py", line > 293, in <listcomp> > new_aces = set(sum([re.findall(re_ace, acl) for acl in > new['univentionShareSambaBaseDirAppendACL']], [])) > File "/usr/lib/python3.7/re.py", line 223, in findall > return _compile(pattern, flags).findall(string) > TypeError: cannot use a string pattern on a bytes-like object > 07.09.21 10:38:59.994 LISTENER ( WARN ) : handler: samba-shares > (failed) > Traceback (most recent call last): > File "/usr/lib/univention-directory-listener/system/samba-shares.py", line > 293, in handler > new_aces = set(sum([re.findall(re_ace, acl) for acl in > new['univentionShareSambaBaseDirAppendACL']], [])) > File "/usr/lib/univention-directory-listener/system/samba-shares.py", line > 293, in <listcomp> > new_aces = set(sum([re.findall(re_ace, acl) for acl in > new['univentionShareSambaBaseDirAppendACL']], [])) > File "/usr/lib/python3.7/re.py", line 223, in findall > return _compile(pattern, flags).findall(string) > TypeError: cannot use a string pattern on a bytes-like object > 07.09.21 10:39:00.615 LISTENER ( WARN ) : handler: samba-shares > (failed) > Traceback (most recent call last): > File "/usr/lib/univention-directory-listener/system/samba-shares.py", line > 293, in handler > new_aces = set(sum([re.findall(re_ace, acl) for acl in > new['univentionShareSambaBaseDirAppendACL']], [])) > File "/usr/lib/univention-directory-listener/system/samba-shares.py", line > 293, in <listcomp> > new_aces = set(sum([re.findall(re_ace, acl) for acl in > new['univentionShareSambaBaseDirAppendACL']], [])) > File "/usr/lib/python3.7/re.py", line 223, in findall > return _compile(pattern, flags).findall(string) > TypeError: cannot use a string pattern on a bytes-like object > 07.09.21 10:39:01.301 LISTENER ( WARN ) : handler: samba-shares > (failed) > 07.09.21 10:39:01.305 LISTENER ( WARN ) : finished initializing > module samba-shares with rv=0 univention-samba4=9.0.6-1A~5.0.0.202104151055 in ucs_5.0-0 is broken, resync only works with Versionstabelle: 9.0.6-3A~5.0.0.202106221159 500 500 http://updates-test.software-univention.de/5.0/maintained/component 5.0-0-errata-test/amd64/ Packages 500 https://appcenter-test.software-univention.de/univention-repository/5.0/maintained/component ucsschool_20201208103021/amd64/ Packages Versionstabelle: 9.0.6-3A~5.0.0.202106221159 500 500 http://updates-test.software-univention.de/5.0/maintained/component 5.0-0-errata-test/amd64/ Packages 500 https://appcenter-test.software-univention.de/univention-repository/5.0/maintained/component ucsschool_20201208103021/amd64/ Packages which is installed after the update (and the postup call) so i think we have to remove that samba-shares resync, or restrict the resync to school and somehow install version 9.0.6-3A~5.0.0.202106221159 during the update
Yes, that's what I wrote in comment 10. I pushed 9.0.6-3A~5.0.0.202106221159 into the test-appcenter UCS@school app. Shouldn't this be enough that it is installed exactly during the UCS 5.0 upgrade? The traceback only happens with `univentionShareSambaBaseDirAppendACL` set, which is only used in UCS@school. So I think we can go with the current state.
(In reply to Florian Best from comment #13) > Yes, that's what I wrote in comment 10. > I pushed 9.0.6-3A~5.0.0.202106221159 into the test-appcenter UCS@school app. > Shouldn't this be enough that it is installed exactly during the UCS 5.0 > upgrade? > The traceback only happens with `univentionShareSambaBaseDirAppendACL` set, > which is only used in UCS@school. So I think we can go with the current > state. for the 5.0-0 update we set [ -f /etc/apt/preferences.d/99ucs500.pref ] || cat >/etc/apt/preferences.d/99ucs500.pref <<__PREF__ Package: * Pin: release l=Univention Corporate Server, v=5.0.0 Pin-Priority: 1001 __PREF__ [ -f /etc/apt/apt.conf.d/99ucs500 ] || echo 'APT::Get::Allow-Downgrades "true";' >/etc/apt/apt.conf.d/99ucs500 what this means (as far as i understand) is, for all packages use the 5.0-0 release even if that is a downgrade or there are higher versions from other sources that is why the univention package from the app's repo are not installed during the update to 5.0-0 just for testing i added Package: * Pin: origin appcenter-test.software-univention.de Pin-Priority: 1002 this works now. But we have to discuss the correct solution internally.
(In reply to Felix Botner from comment #14) > But we have to discuss the correct solution internally. This topic will be continued in Bug #53782.
(In reply to Florian Best from comment #11) > TODO: > > sed -i '/univentionShareSambaBlockingLocks/d' > test/ucs-test-tools/usr/share/ucs-test-tools/customer5000.ldif > > I think we can for now leave the UDM modules as they are, and open a new bug > to remove the properties (along with others) when 4.4 is out of maintenance. d8f2d701c30cc84fe41e0b505f052b375bd826fe
OK: listener_resync OK: postup.sh OK: Bug #53785 for the removal OK: ucs-test-tools OK: Bug #53782 for the repository
release * cp /var/univention/buildsystem2/mirror/ftp/dists/ucs500/ * update_mirror checked updated -> ucr get repository/online/server updates.software-univention.de -> univention-upgrade --ignoressh --ignoreterm --disable-app-updates updater.log running univention-directory-listener-ctrl resync udm_extension ldap_extension listener shutdown done so the postup still works.