Bug 50578 - Disabling of DEMOSCHOOL creation has no effect if another system joins
Disabling of DEMOSCHOOL creation has no effect if another system joins
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: General
UCS@school 4.4
amd64 Linux
: P5 minor (vote)
: UCS@school 4.4 v4-errata
Assigned To: Tobias Wenzel
Ole Schwiegert
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-11-29 13:10 CET by Lukas Zumvorde
Modified: 2020-03-25 16:09 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.046
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 Lukas Zumvorde univentionstaff 2019-11-29 13:10:08 CET
I encountered this bug while installing a fresh UCS environment.

Situation:
- an empty environment without UCS systems

Reproduction:
- the UCS master was installed
- UCS@School was not yet installed
- the UCR variable ucsschool/join/create_demo got set to 'no'
- UCS@School was installed and configured
- The DEMOSCHOOL was not created as expected
- The UCS Backup was installed and during the installation process joined
- after the install was finished the DEMOSCHOOL was created

Conclusion:
- UCS@school gets installed during the join of the UCS backup. 
- Since the UCSV ucsschool/join/create_demo is not set, on the backup, a DEMOSCHOOL is created.

Expected Behaviour:
- the DEMOSCHOOL is not created during a join process.
Comment 1 Daniel Tröder univentionstaff 2020-01-24 16:43:08 CET
Happend again: https://help.univention.com/t/ucs-school-einrichten-von-demoschool/14152/
Comment 2 Ole Schwiegert univentionstaff 2020-01-27 09:40:39 CET
I think the problem originates from my believe that 62ucs-school-master.inst would be run on masters only and not masters and backup.

Hence he following code section should also include a check for the server role "master"

if is_ucr_true "ucsschool/join/create_demo"; then
	[ -d /etc/ucsschool ] || mkdir -p /etc/ucsschool
	touch /etc/ucsschool/demoschool.secret
	chmod 640 /etc/ucsschool/demoschool.secret
	makepasswd --chars 16 > /etc/ucsschool/demoschool.secret
	python /usr/share/ucs-school-metapackage/scripts/create_demoportal.py
	univention-config-registry set ucsschool/join/create_demo=no
fi
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2020-02-18 11:34:41 CET
The specific code part of the join script that creates a demo school should only be run on a DC master.
Comment 4 Tobias Wenzel univentionstaff 2020-02-20 13:53:05 CET
I added the suggested check in 62ucs-school-master.inst. After (re-)running the join-script, no demoschool was created.

The scenario can be reproduced by:

- installing ucsschool on master and set ucrv ucsschool/join/create_demo
  -> check if demoschool was not created. 
- install ucs on backup without joining the domain after installation
- set ucrv to no and join 
  -> check if demoschool was not created.
- unset ucrv and alter script 
- rerun altered script 
$ univention-run-join-scripts --force --run-scripts 62ucs-school-master.inst
 -> check if demoschool was not created. 

The check was done by:
$ univention-ldapsearch -LLL -b "ou=DEMOSCHOOL,$(ucr get ldap/base)" dn

[4.4] 66bf63dcf Bug #50578: Don't create the demoschool while joining a backup if UCRV create_demo is set to 'no' on master.

Package: ucs-school-metapackage
Version: 12.0.2-7A~4.4.0.202002201333
Branch: ucs_4.4-0
Scope: ucs-school-4.4
Comment 5 Ole Schwiegert univentionstaff 2020-03-19 22:24:28 CET
Changelog: OK
Advisory: OK
Package installs: OK
Changes work as intended: OK
 -- Tested with Single&Multiserver Env. Joining Backup after setting UCRV to "no". DEMOSCHOOL was not installed as intended, but is installed if set to yes on master.
Comment 6 Sönke Schwardt-Krummrich univentionstaff 2020-03-25 16:09:26 CET
UCS@school 4.4 v5 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.4v5-de.html

If this error occurs again, please clone this bug.