Bug 48751 - Reset join status file after join hooks have been called
Reset join status file after join hooks have been called
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Join (univention-join)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4
Assigned To: Sönke Schwardt-Krummrich
Daniel Tröder
:
Depends on: 48731
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-25 13:37 CET by Sönke Schwardt-Krummrich
Modified: 2019-03-12 13:41 CET (History)
0 users

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.549
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 Sönke Schwardt-Krummrich univentionstaff 2019-02-25 13:37:15 CET
UCS@school (4.4 and higher) installs necessary packages on DC backup systems automatically via a join/pre-joinscripts hook. During installation, packages automatically execute their join scripts via a call_joinscript call within their postinst script. These joinscripts then note in the join status file /var/univention-join/status that they have already been executed successfully. 
If univention-join then executes all join scripts, the join process terminates with an error because the previously executed join scripts terminate with exit code 1 (already executed).
Currently, univention-join resets the join status file BEFORE executing the hooks (join/pre-joinscripts).


+++ This bug was initially created as a clone of Bug #48731 +++

The joinscript 00ucs-school-app-version-check.inst failed silently on initial join of a UCS 4.4 DC backup. On the DC master, UCS@school had been installed and correctly configured (a join hook had been installed). The join hook installed the UCS@school app and the metapackage ucs-school-master on the DC backup. The postinst scripts of several packages directly call their joinscript. This is why 63ucs-school-portal-entry.inst is called directly before  
00ucs-school-app-version-check.inst.

00ucs-school-app-version-check.inst is started but then immediately fails without error message in the logfile. Since this is the first join script on a DC backup, the join attempt fails.

A second join attempts runs through without problems. The reason for the first fail is currently unknown.

Calling joinscript 63ucs-school-portal-entry.inst ...
2019-02-20 18:48:14.366037821+01:00 (in joinscript_init)
WARNING: cannot append cn=domain,cn=portal,cn=univention,dc=nstx,dc=local to portal, value exists
WARNING: cannot append ['de_DE', 'UCS@school'] to displayName, value exists
WARNING: cannot append ['en_US', 'UCS@school'] to displayName, value exists
WARNING: cannot append ['fr_FR', 'UCS@school'] to displayName, value exists
WARNING: cannot append ['de_DE', 'UCS@school Module in der Univention Management Console'] to description, value exists
WARNING: cannot append ['en_US', 'UCS@school modules in the Univention Management Console'] to description, value exists
WARNING: cannot append ['fr_FR', 'Modules UCS@school dans Univention Management'] to description, value exists
No modification: cn=teacherconsole,cn=portal,cn=univention,dc=nstx,dc=local
No modification: cn=teacherconsole,cn=portal,cn=univention,dc=nstx,dc=local
2019-02-20 18:48:14.932175226+01:00 (in joinscript_save_current_version)
Joinscript 63ucs-school-portal-entry.inst finished with exitcode 0
Trigger für univention-config (13.0.0-6A~4.3.0.201811121038) werden verarbeitet ...
Trigger für python-support (1.0.15.18.201403132013) werden verarbeitet ...
W: --force-yes is deprecated, use one of the options starting with --allow instead.
Configure 00ucs-school-app-version-check.inst Wed Feb 20 18:48:16 CET 2019
2019-02-20 18:48:16.595955986+01:00 (in joinscript_init)


**************************************************************************
* Join failed!                                                           *
* Contact your system administrator                                      *
**************************************************************************
* Message:  Please visit https://help.univention.com/t/8842 for common problems during the join and how to fix them -- FAILED: 00ucs-school-app-version-check.inst
**************************************************************************
Wed Feb 20 18:48:16 CET 2019: finish /usr/sbin/univention-join
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2019-02-25 14:12:41 CET
Package: univention-join
Version: 11.0.1-12A~4.4.0.201902251347
Branch: ucs_4.4-0
Scope:

ccced84714 Bug #48751: add changelog.xml entry
53e5699ade Bug #48751: reset the status file a second time to prevent issues with join hooks

The status file is now reset twice. At the regular location BEFORE running the join/pre-joinscripts hooks, so that they can e.g. recognize that they were executed by univention-join and once immediately afterwards to undo the changes of the hooks to the status file.
Comment 2 Daniel Tröder univentionstaff 2019-02-25 16:36:50 CET
OK: code changes
OK: changelog entry
Comment 3 Florian Best univentionstaff 2019-03-12 13:41:11 CET
UCS 4.4 has been released:
 https://docs.software-univention.de/release-notes-4.4-0-en.html
 https://docs.software-univention.de/release-notes-4.4-0-de.html

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