Landscape Server update fails with database schema error

Das Update von landscape-server auf Version 19.10.8 bricht mit folgender Fehlermeldung ab:

landscape-server (19.10.8-0ubuntu1) wird eingerichtet ...
========================================================================
Attempting schema upgrade as requested.
WARNING: this could take several minutes or more.
========================================================================
2022-05-06 05:56:55.310Z INFO landscape-setup "Bootstrapping from service.conf file ..."
2022-05-06 05:56:55.345Z INFO landscape-setup "Skipping configuration migration ..."
2022-05-06 05:56:55.345Z INFO landscape-setup "Checking Landscape databases ..."
2022-05-06 05:56:55.353Z INFO landscape-setup "Checking database schema ..."
2022-05-06 05:56:56.143Z ERROR landscape-setup "Encountered database error"
Traceback (most recent call last):
File "/opt/canonical/landscape/canonical/landscape/scripts/standalone/plugins/database.py", line 478, in update_schema
schema.run(args=args)
File "/opt/canonical/landscape/canonical/landscape/scripts/schema.py", line 326, in run
sharding.upgrade()
File "/usr/lib/python2.7/dist-packages/storm/schema/sharding.py", line 114, in upgrade
schema.advance(store, version)
File "/usr/lib/python2.7/dist-packages/storm/schema/schema.py", line 187, in advance
patch_applier.apply(version)
File "/usr/lib/python2.7/dist-packages/storm/schema/patch.py", line 114, in apply
module.apply(self._store)
File "/opt/canonical/landscape/canonical/landscape/schema/patch_478/main.py", line 14, in apply
store.execute(statement)
File "/usr/lib/python2.7/dist-packages/storm/store.py", line 109, in execute
return self._connection.execute(statement, params, noresult)
File "/usr/lib/python2.7/dist-packages/storm/databases/postgres.py", line 306, in execute
return Connection.execute(self, statement, params, noresult)
File "/usr/lib/python2.7/dist-packages/storm/database.py", line 241, in execute
raw_cursor = self.raw_execute(statement, params)
File "/usr/lib/python2.7/dist-packages/storm/databases/postgres.py", line 316, in raw_execute
return Connection.raw_execute(self, statement, params)
File "/usr/lib/python2.7/dist-packages/storm/database.py", line 374, in raw_execute
self._run_execution(raw_cursor, args, params, statement)
File "/usr/lib/python2.7/dist-packages/storm/database.py", line 388, in _run_execution
self._check_disconnect(raw_cursor.execute, *args)
File "/usr/lib/python2.7/dist-packages/storm/database.py", line 454, in _check_disconnect
return function(*args, **kwargs)
OperationalError: could not access file "$libdir/plpython3": No such file or directory

2022-05-06 05:56:56.151Z INFO landscape-setup "Schema configuration output:\n\nLoading site configuration...\nSetting up database schemas (will timeout after 86400 seconds) ...\n\nUpdate process info to support full u32 UID/GID range.\n\nMigrate to plpython3.\n"
2022-05-06 05:56:56.152Z INFO landscape-setup "Checking package database initial data ..."
2022-05-06 05:56:56.168Z INFO landscape-setup "Package database already initialized."
2022-05-06 05:56:56.169Z INFO landscape-setup "Renaming stock hash-id stores ..."
2022-05-06 05:56:56.170Z INFO landscape-setup "Stock package database not loaded, ignoring stock hash-id stores."
Job for landscape-package-search.service failed because the control process exited with error code.
See "systemctl status landscape-package-search.service" and "journalctl -xe" for details.
invoke-rc.d: initscript landscape-package-search, action "start" failed.
* landscape-package-search.service - Landscape's Package Search daemon
Loaded: loaded (/lib/systemd/system/landscape-package-search.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2022-05-06 07:57:12 CEST; 6ms ago
Process: 10478 ExecStartPre=/opt/canonical/landscape/landscape-schema-check (code=exited, status=1/FAILURE)
Main PID: 1822 (code=exited, status=0/SUCCESS)

Grund für diesen Fehlschlag ist eine nicht eingepflegte Paketabhängigkeit. Das Paket „postgresql-plpython3-10“ wird benötigt, war aber nicht installiert und wird auch nicht automatisch nachinstalliert.

Lösen kann man das ganze wie folgt:

sudo apt install postgresql-plpython3-10

sudo setup-landscape-server

sudo lsctl restart

Es gibt dazu auch einen Bug Report (nicht von mir).

Schreiben Sie einen Kommentar

Ihre E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

* Die DSGVO-Checkbox ist ein Pflichtfeld

*

Zustimmung zur Datenspeicherung lt. DSGVO