Problem: ucs@school App not Installable - Join Fails

Problem: The ucs@school App Is Not Installable - Join Script Fails

When running univention-run-join-scripts (i.e. during an update) it will abort

Error #1

You will see an error message in/var/log/univention/join.log:

2019-07-10 10:11:26,944 ucsschool-join-hook: [INFO] Installing ucsschool=4.4 v2 ...
usage: univention-app install [-h] [--noninteractive] [--username USERNAME]
                              [--pwdfile PWDFILE]
                              [--set KEY=VALUE [KEY=VALUE ...]] [--dry-run]
                              [--do-not-revert] [--only-master-packages]
                              [--do-not-install-master-packages-remotely]
                              [--do-not-pull-image]
                              app
univention-app install: error: Unable to find version 4.4 v2 of app ucsschool. Maybe "/usr/bin/univention-app update" to get the latest list of applications?
2019-07-10 10:11:28,865 ucsschool-join-hook: [ERROR] univention-app install ucsschool=4.4 v2 --skip-check must_have_valid_license --do-not-call-join-scripts failed with exit code 2!
ERROR: join/pre-joinscripts hook /tmp/tmpn1KzfN/tmpd4WYjI failed.


**************************************************************************
* Running join scripts failed!                                           *
**************************************************************************
* Message:  join/pre-joinscripts failed, see /var/log/univention/join.log
**************************************************************************

Error #2

univention-run-join scripts ends in pre-joinscripts hook(s) with no error but not successful:

root@lenaedu:/# univention-run-join-scripts 
univention-run-join-scripts: runs all join scripts existing on local computer.
copyright (c) 2001-2019 Univention GmbH, Germany

Enter DC Master Account : Administrator
Enter DC Master Password: 

Search LDAP binddn:                                        done
Running pre-joinscripts hook(s):

Investigation

Step 1 - Verify Package State

The ucs@school app packages seems to be installed as the packages are installed. Check especially for ucs-school-slave package:

root@lenaedu:/# dpkg -l| grep ii| grep ucs-school
ii  python-ucs-school                                   12.1.1-6A~4.4.0.201905061453                     all          UCS@school - common Python modules
ii  shell-ucs-school                                    12.1.1-6A~4.4.0.201905061453                     all          UCS@school - common shell functions
ii  ucs-school-branding                                 8.0.0-0A~4.4.0.201902111516                      all          UCS@school - branding for UMC frontend
ii  ucs-school-info                                     9.0.0-0A~4.4.0.201902111517                      all          UCS@school: provides info script
ii  ucs-school-l10n-fr                                  4.0.0-1A~4.4.0.201902121520                      all          UCS Management Console translation files
ii  ucs-school-netlogon                                 9.0.0-0A~4.4.0.201902111522                      all          UCS@school: netlogon template
ii  ucs-school-netlogon-user-logonscripts               15.0.0-1A~4.4.0.201902190837                     all          UCS@school userspecific netlogon scripts
ii  ucs-school-old-homedirs                             14.0.0-0A~4.4.0.201902111524                     all          UCS@school listener module to move away obsolete home directories
ii  ucs-school-old-sharedirs                            14.0.0-0A~4.4.0.201902111525                     all          UCS@School listener module to move away obsolete share directories
ii  ucs-school-s4-branch-site                           7.0.0-0A~4.4.0.201902111528                      all          UCS@school Samba4 branch site configuration
ii  ucs-school-slave                                    12.0.1-1A~4.4.0.201904011404                     all          UCS@school meta package for UCS DC Slave System
[...]

If the packages do not appear as installed try installing by univention-app install ucsschool. If this does not succeed, proceed with the next step.

Step 2 - Check App Registration

See if the installed packages are properly registered as Univention ucs@school-app:
Here you notice univention-app info tells us ucsschool is not installed:

root@lenaedu:/# univention-app info
UCS: 4.4-0 errata109
Installed: cups=2.2.1 samba4=4.10 squid=3.5
Upgradable:

So we have a mismatch. All packages are installed but univention-app still tells the app is not installed.

Step 3 - Try to Install Manually

Trying to install the app manually fails, too:

root@lenaedu:/# univention-app install ucsschool
usage: univention-app install [-h] [--noninteractive] [--username USERNAME]
                              [--pwdfile PWDFILE]
                              [--set KEY=VALUE [KEY=VALUE ...]] [--dry-run]
                              [--do-not-revert] [--only-master-packages]
                              [--do-not-install-master-packages-remotely]
                              [--do-not-pull-image]
                              app
univention-app install: error: Unable to find app ucsschool. Maybe "/usr/bin/univention-app update" to get the latest list of applications?

Solution

Step 1

Update the locally stored list of apps with univention-app update.

root@lenaedu:/# univention-app  update
Downloading "https://appcenter.software-univention.de/meta-inf/app-categories.ini"...
Downloading "https://appcenter.software-univention.de/meta-inf/rating.ini"...
Downloading "https://appcenter.software-univention.de/meta-inf/license_types.ini"...
Downloading "https://appcenter.software-univention.de/meta-inf/ucs.ini"...
Downloading "https://appcenter.software-univention.de/meta-inf/4.4/index.json.gz"...
Downloading "https://appcenter.software-univention.de/meta-inf/4.4/index.json.gz.gpg"...
Downloading "https://appcenter.software-univention.de/meta-inf/4.4/all.tar.gpg"...
Downloading "http://appcenter.software-univention.de/meta-inf/4.4/all.tar.zsync"...
Downloading "https://appcenter.software-univention.de/meta-inf/4.3/index.json.gz"...
Downloading "https://appcenter.software-univention.de/meta-inf/4.3/index.json.gz.gpg"...
Downloading "https://appcenter.software-univention.de/meta-inf/4.3/all.tar.gpg"...
Downloading "https://appcenter.software-univention.de/meta-inf/4.2/index.json.gz"...
Downloading "https://appcenter.software-univention.de/meta-inf/4.2/index.json.gz.gpg"...
Downloading "https://appcenter.software-univention.de/meta-inf/4.2/all.tar.gpg"...
Downloading "https://appcenter.software-univention.de/meta-inf/4.1/index.json.gz"...
Downloading "https://appcenter.software-univention.de/meta-inf/4.1/index.json.gz.gpg"...
Downloading "https://appcenter.software-univention.de/meta-inf/4.1/all.tar.gpg"...
File: /usr/share/univention-management-console/modules/apps.xml

Multifile: /etc/apache2/sites-available/default-ssl.conf

File: /usr/share/univention-management-console/i18n/de/apps.mo

File: /usr/share/univention-portal/apps.json

Multifile: /etc/apache2/sites-available/000-default.conf

Step 2

Check if the ucsschool app appears as installed after updating the app list:

root@lenaedu:/# univention-app info
UCS: 4.4-0 errata109
Installed: cups=2.2.1 samba4=4.10 squid=3.5 ucsschool=4.4 v2
Upgradable:

Step 3

Run join scripts again as they should succeed.

root@lenaedu:/# univention-run-join-scripts 
univention-run-join-scripts: runs all join scripts existing on local computer.
copyright (c) 2001-2019 Univention GmbH, Germany

Enter DC Master Account : Administrator
Enter DC Master Password: 

Search LDAP binddn:                                        done
Running pre-joinscripts hook(s):                           done
Running 00ucs-school-app-version-check.inst                skipped (already executed)
Running 00ucs-school-slave-check-ou.inst                   skipped (already executed)
Running 01univention-ldap-server-init.inst                 skipped (already executed)
Running 03univention-directory-listener.inst               skipped (already executed)
[...]
Mastodon