Bug 45095 - Purging UMC-web-server before join breaks later join
Purging UMC-web-server before join breaks later join
Status: NEW
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-28 13:23 CEST by Philipp Hahn
Modified: 2020-06-22 15:48 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.017
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 Philipp Hahn univentionstaff 2017-07-28 13:23:00 CEST
The packages univention-management-console* are optional and can be purged.
If this is done before the system is joined (in my case a member server used for KVM only) the un-join-scipt /usr/lib/univention-install/09univention-management-console-web-server.uinst is installed.
When later the system is joined, it fails as it tries to access the non-existing LDAP host entry @ `ldap/hostdn`.

This is a generic join-bug probably found in every package using unjoin-scripts:
.uinst files should only be installed if the system is joined and any (previous) version of the corresponding join script was executed (successfully).

Reproducer:
 docker run -d --name=master --hostname=master -e domainname=$(ucr get domainname) -e rootpwd=univention -e nameserver1=$(dig +search +short $HOSTNAME) -p 8081:80 docker.software-univention.de/ucs-appbox-amd64:4.1-0 /sbin/init
 docker exec -ti master bash
  univention-join
  apt-get -qq update
  apt-get install univention-management-console-web-server
  apt-get --purge remove univention-management-console-web-server
  ls -l /usr/lib/univention-install/09univention-management-console-web-server.uinst
  printf %s univention > univention
  univention-join -dcaccount Administrator -dcpwd univention
...
> Configure 09univention-management-console-web-server.uinst failed
Comment 1 Philipp Hahn univentionstaff 2017-08-03 12:34:12 CEST
Even if the system was joined, removing the packages fails:
>RUNNING 09univention-management-console-web-server.uinst
>2017-08-03 12:25:51.125027104+02:00 (in joinscript_init)
>Object modified: cn=host2,cn=memberserver,cn=computers,dc=phahn,dc=dev
>unknown module saml/serviceprovider.


And the *un*installation script can not restart its removed binary:
>/etc/init.d/univention-management-console-web-server restart
I think that should be removed.

And on a member server this is going to fail, as it has no OpenLDAP:
>/etc/init.d/slapd crestart
At least no ||die, better add ||: