Bug 53003 - update to UCS 5 fail with univention-legacy-kolab-schema
update to UCS 5 fail with univention-legacy-kolab-schema
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - Release updates
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Felix Botner
Erik Damrose
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-29 13:02 CEST by Felix Botner
Modified: 2021-05-25 16:01 CEST (History)
2 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 Felix Botner univentionstaff 2021-03-29 13:02:15 CEST
during the update is see

File: /etc/init.d/slapd^M
Multifile: /etc/ldap/slapd.conf^M
  File "<stdin>", line 13^M
    print 'include         /usr/share/univention-ldap/schema/legacy/%s' % fn^M
                                                                      ^^M
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('include         /usr/share/univention-ldap/schema/legacy/%s' % fn)?^M
  File "<stdin>", line 13^M
    print 'include         /usr/share/univention-ldap/schema/legacy/%s' % fn^M
                                                                      ^^M


the kolab schema template is broken and has to be removed before the update, maybe we should check this in the pre-up?
Comment 2 Felix Botner univentionstaff 2021-05-11 11:52:44 CEST
as discussed

block update if univention-legacy-kolab-schema is installed,

two options now

(a) Register LDAP schema files from univention-legacy-kolab-schema
or
(b) Remove the LDAP schema extension.

but please have a look at the text
Comment 3 Felix Botner univentionstaff 2021-05-11 13:40:53 CEST
updated 

Tests - UCS update - update-from-2.4-start-4.4-7 (test/scenarios/update-testing/update-from-2.4-start-4.4-7.cfg)

to not remove the "kolab" objects but to register the old kolan LDAP schema.
Comment 4 Erik Damrose univentionstaff 2021-05-11 17:39:59 CEST
OK: Check for installed package, does not block if package is not installed
OK: Text, see below
OK: ucs test scenario uses the same commands as the text description to register the schema
Verified

For reference, the text added in git dff16c83c2
" The package univention-legacy-kolab-schema is installed. This package is"
" incompatible with UCS 5.0-0."

" As the package contains a LDAP schema extension, this extension (a) has to"
" registered in the LDAP database or (b) has to be removed before the update"
" to UCS 5.0 is possible."

" Note: These steps are only required on the Primary Node. On non-primary systems,"
"       the package can be removed without step (a) or (b)."

" (a) Register LDAP schema files from univention-legacy-kolab-schema:"
"     To register the LDAP schema, run the following commands:" 
"     cat /usr/share/univention-ldap/schema/legacy/rfc2739.schema > /opt/kolab-legacy.schema"
"     cat /usr/share/univention-ldap/schema/legacy/kolab2.schema >> /opt/kolab-legacy.schema"
"     cat /usr/share/univention-ldap/schema/legacy/univention-kolab2.schema >> /opt/kolab-legacy.schema"
"     cat /usr/share/univention-ldap/schema/legacy/kolab-legacy.schema >> /opt/kolab-legacy.schema"
"     bash -c 'source /usr/share/univention-lib/ldap.sh && ucs_registerLDAPExtension --packagename \"univention-legacy-kolab-schema\" --packageversion \"3.0.0-1.22.201309110849\" --schema /opt/kolab-legacy.schema'"

" or (b) Remove the LDAP schema extension:"
"        Please visit https://help.univention.com/t/6443 for how to remove LDAP schema extensions"
"        (remove all attributes and objectclasses from that schema from the LDAP database)." 

" After either (a) or (b) has been completed, the package has to be removed from this server:"
"  univention-remove --purge univention-legacy-kolab-schema"
Comment 5 Florian Best univentionstaff 2021-05-25 16:01:01 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".