Bug 47551 - Block UCS 4.2 update to 4.3 with ox app installed due to schema registration
Block UCS 4.2 update to 4.3 with ox app installed due to schema registration
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - Release updates
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3-1-errata
Assigned To: Erik Damrose
Sönke Schwardt-Krummrich
:
Depends on:
Blocks: 47581
  Show dependency treegraph
 
Reported: 2018-08-09 12:25 CEST by Erik Damrose
Modified: 2018-08-21 13:10 CEST (History)
1 user (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 Erik Damrose univentionstaff 2018-08-09 12:25:31 CEST
Adapt the 4.3-0 preup.sh on *all* UCS systems and block the update to 4.3, when


The OX app is installed locally *AND*
( 
  the OX schema is not present in LDAP 
  *OR* 
  the schema file "oxforucs.schema" is not marked as ACTIVE in local LDAP
)


If that is the case, show a helptext that links to an sdb article with hints on how to proceed. There will be an erratum which enabled the ldap schema registration for the ox app, so one fix is to update the ucs master to that erratalevel.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2018-08-15 14:48:47 CEST
New problem: 
the LDAP schema is always marked ACTIVE but not used.

It looks like we have to check the UCR variable ox/master/42/registered_ldap_acls on the DC master. Unless it's set to "yes", we have to stop the update.
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2018-08-15 14:50:00 CEST
New logic:

The OX app is installed locally *AND*
( 
  the OX schema is not present in LDAP 
  *OR* 
  on DC master is UCR variable ox/master/42/registered_ldap_acls != "yes"
)
Comment 3 Erik Damrose univentionstaff 2018-08-15 17:45:45 CEST
df10f74 Adapt preup for OX

test if the app is installed by checking for the default package. Only then checks for the UCRv and ldap schema is run. The check for the UCRv is logging into the master via ssh regardless the server role.
The output of both checks is dumped to updater.log for debugging

The sdb article should be filled with information how to fix the issue: https://help.univention.com/t/9440

Set UCRv update43/ignore_ox_schema_issue to true to avoid the preup abort.
Comment 4 Daniel Tröder univentionstaff 2018-08-17 15:26:22 CEST
The blocking has worked in my tests.
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2018-08-17 17:53:42 CEST
Found some logic bugs → REOPEN
Comment 6 Erik Damrose univentionstaff 2018-08-17 21:37:26 CEST
Thanks Sönke for the suggestions. I applied them and pushed the preup to the test servers.

a293f51b Adapt 4.3-0 preup for OX
Comment 7 Erik Damrose univentionstaff 2018-08-21 11:21:53 CEST
As discussed, i pushed the preup to the public repository server http://updates.software-univention.de/4.3/maintained/4.3-0/all/
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2018-08-21 13:10:43 CEST
OK: code change
OK: manual test
OK: signature