Univention Bugzilla – Bug 52661
[O365] Update to App v3.3: Joinscript may fail when updating from previous version
Last modified: 2021-01-18 18:29:41 CET
Due to a logic error in the joinscript 40univention-office365.inst, the joinscript run will not complete and be marked as such when updating to app version 3.3. This will occur if the app was installed with version 3.1 or less (JS Version <=5) and has been updated to app version 3.2 (JS Version 6), before updating to app version 3.3 (JS Version 7). This will affect most installed app versions and cause support tickets. There is no easy workaround. Marking joinscript v7 as successful is not sufficient, as a re-run of the joinscript will cause the same error. Error in appcenter.log: 30299 packages 21-01-12 09:44:01 [ INFO]: Neue Version der Konfigurationsdatei /etc/univention/registry.info/variables/univention-office365.cfg wird installiert ... 30299 packages 21-01-12 09:44:01 [ INFO]: File: /etc/cron.d/univention-office365-token 30299 packages 21-01-12 09:44:07 [ INFO]: Calling joinscript 40univention-office365.inst ... 30299 packages 21-01-12 09:44:07 [ INFO]: 2021-01-12 09:44:07.471247343+01:00 (in joinscript_init) ... 30299 packages 21-01-12 09:44:51 [ INFO]: Object exists: cn=UniventionOffice365GroupADConnectionAlias,cn=custom attributes,cn=univention,dc=ucs,dc=internal 30299 packages 21-01-12 09:44:52 [ INFO]: ERROR: Object not found in UDM. 30299 packages 21-01-12 09:44:53 [ INFO]: ERROR: Object not found in UDM. 30299 packages 21-01-12 09:44:54 [ INFO]: Azure AD connection alias defaultADconnection is already listed in UCR office365/adconnection/alias/. 30299 packages 21-01-12 09:44:55 [ INFO]: AzureAuth.is_initialized('defaultADconnection'): KeyError('client_id',) 30299 packages 21-01-12 09:44:55 [ INFO]: Error: Azure AD connection 'defaultADconnection' is not initialized after copying. Exiting. 30299 packages 21-01-12 09:44:55 [ INFO]: Joinscript 40univention-office365.inst finished with exitcode 1 The fix is to run parts of the joinscript for migrating data/settings only if it has not been done before.
f60ce79f Fix logic to only execute migration steps if they have not been done before univention-office365 2.0.2-99A~4.4.0.202101151214 To reproduce the original issue: #Install app v3.1 univention-app install office365=3.1 # Setup azure ad connection, or unrelated errors will occur when updating. # "update" to app v3.2 univention-app install office365=3.2 # upgrade to current latest v3.3 with e.g. univention-upgrade or UMC app center
fail - for new installations JS_LAST_EXECUTED_VERSION seems to be 0 and both conditions matches, join scripts fails azure connections migrate block OK - update
(In reply to Felix Botner from comment #2) > fail - for new installations JS_LAST_EXECUTED_VERSION seems to be 0 and > both conditions matches, join scripts fails azure connections > migrate block > > OK - update found this in 96univention-samba4.inst: if [ $JS_LAST_EXECUTED_VERSION -lt 4 ] && [ $JS_LAST_EXECUTED_VERSION -gt 0 ]; then so at least for the azure connections migrate block we might need something like this
(In reply to Felix Botner from comment #3) > so at least for the azure connections migrate block we might need something > like this The extattrs should be created with the correctly renamed settings, so we need it for both blocks. Thanks for catching this. Fixed in git 18d1025 univention-office365 2.0.2-100A~4.4.0.202101151506
OK, looks good
Released with Univention Microsoft 365 Connector v3.4