Bug 51497 - Remove univention-samba4wins in UCS 5.0
Remove univention-samba4wins in UCS 5.0
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Florian Best
Sebastian Lobinger
:
Depends on: 51655
Blocks: 52961
  Show dependency treegraph
 
Reported: 2020-06-15 15:03 CEST by Florian Best
Modified: 2021-05-25 15:59 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2020-06-15 15:03:30 CEST
The package univention-samba4wins will be removed in UCS 5.0.

We should purge it in the preup.sh (or warn if it's installed and block the update).

We should also make sure upgrading is only possible if the schema is removed and all objects which uses the schema are removed:

attributetype ( 1.3.6.1.4.1.10176.1000.307.1.1 NAME 'univentionSamba4WinsNetbiosName'
attributetype ( 1.3.6.1.4.1.10176.1000.307.1.2 NAME 'univentionSamba4WinsSecondaryIp'
objectclass ( 1.3.6.1.4.1.10176.1000.307.2.1 NAME 'univentionSamba4WinsHost'
Comment 1 Felix Botner univentionstaff 2021-03-08 12:09:28 CET
Please also remove/think about (??) the extended attributes  (89univention-samba4wins-schema.inst)

samba4wins-secondaryIp
samba4wins-netbiosName
Comment 2 Felix Botner univentionstaff 2021-03-08 12:12:48 CET
(In reply to Felix Botner from comment #1)
> Please also remove/think about (??) the extended attributes 
> (89univention-samba4wins-schema.inst)
> 
> samba4wins-secondaryIp
> samba4wins-netbiosName

maybe best to remove those before the update, these extended attributes are not particular helpful without the LDAP schema in UCS 5.0-0
Comment 3 Florian Best univentionstaff 2021-03-19 16:06:35 CET
The packages have been removed:
2519b0e686d1 | Bug #51497: remove univention-samba4wins

The update is blocked if there are objects using the schema file:

univention-updater (15.0.0-8)
a467f09a49ea | Bug #51497: Bug #51973: Bug #31048: Bug #51655: block upgrade if LDAP contains old objects

extended attributes, etc. are removed via Bug #52961.

The packages are removed via a Breaks entry in univention-server-role-common.
Comment 4 Philipp Hahn univentionstaff 2021-03-22 17:41:24 CET
(In reply to Florian Best from comment #0)
> The package univention-samba4wins will be removed in UCS 5.0.
> 
> We should purge it in the preup.sh (or warn if it's installed and block the
> update).
> 
> We should also make sure upgrading is only possible if the schema is removed
> and all objects which uses the schema are removed:
> 
> attributetype ( 1.3.6.1.4.1.10176.1000.307.1.1 NAME 'univentionSamba4WinsNetbiosName'
> attributetype ( 1.3.6.1.4.1.10176.1000.307.1.2 NAME 'univentionSamba4WinsSecondaryIp'
> objectclass ( 1.3.6.1.4.1.10176.1000.307.2.1 NAME 'univentionSamba4WinsHost'

OpenLDAP does not support removing LDAP schema:
<https://help.univention.com/t/remove-ldap-schema-extensions/6443>

The only way to get rid of the schema requires a complete dump-restore cycle:
<https://help.univention.com/t/problem-after-a-ldap-schema-was-removed-there-are-still-some-references-in-your-ldap/11810>

If you're lucky you get this for free with the next upgrade of OpenLDAP, as it does that dump-restore-cycle (if not disabled via UCRV update43/slapd/database/dump) on database format changes. But this happens rarely. See patches/openldap/5.0-0-0-ucs/2.4.47+dfsg-3+deb10u5/85_disable_move_and_dump.patch


Therefore for old systems where services/univention-samba4wins/schema/univention-samba4wins.schema was ever installed you cannot simply remove the file or the package providing it.

For a clean upgrade you should instead register the schema as "settings/ldapschema" to keep it even after the package has been removed as we did with Bug #51955.


On the other hand "univention-samba4wins" is *un*maintained in all versions of UCS-4:
> SELECT * FROM binpkg WHERE srcpkg='univention-samba4wins' AND major>=4 AND site='ftp' ORDER BY major,minor,patch ASC;

So just removing the schema will lead to errors, but we can redirect those few to the help articles from above if they care.
Comment 5 Sebastian Lobinger univentionstaff 2021-03-25 10:00:06 CET
verified:
- mentioned in release notes
- changelog entry exists
- package is not available in UCS 5
Comment 6 Florian Best univentionstaff 2021-05-25 15:59:59 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".