Landscape Server update fails with database schema error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Server |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Setting up landscape-server (19.10.8-0ubuntu1) ...
=======
Attempting schema upgrade as requested.
WARNING: this could take several minutes or more.
=======
2022-04-22 15:22:35.892Z INFO landscape-setup "Bootstrapping from service.conf file ..."
2022-04-22 15:22:35.913Z INFO landscape-setup "Skipping configuration migration ..."
2022-04-22 15:22:35.914Z INFO landscape-setup "Checking Landscape databases ..."
2022-04-22 15:22:35.930Z WARNING landscape-setup "Database u'landscape-
2022-04-22 15:22:35.930Z WARNING landscape-setup "Database u'landscape-
2022-04-22 15:22:35.930Z WARNING landscape-setup "Database u'landscape-
2022-04-22 15:22:35.931Z WARNING landscape-setup "Database u'landscape-
2022-04-22 15:22:35.931Z WARNING landscape-setup "Database u'landscape-
2022-04-22 15:22:35.932Z WARNING landscape-setup "Database u'landscape-
2022-04-22 15:22:35.934Z INFO landscape-setup "Checking database schema ..."
2022-04-22 15:22:37.473Z ERROR landscape-setup "Encountered database error"
Traceback (most recent call last):
File "/opt/canonical
schema.
File "/opt/canonical
sharding.
File "/usr/lib/
schema.
File "/usr/lib/
patch_
File "/usr/lib/
module.
File "/opt/canonical
store.
File "/usr/lib/
return self._connectio
File "/usr/lib/
return Connection.
File "/usr/lib/
raw_cursor = self.raw_
File "/usr/lib/
return Connection.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
return function(*args, **kwargs)
OperationalError: could not access file "$libdir/
2022-04-22 15:22:37.478Z INFO landscape-setup "Schema configuration output:\n\nLoading site configuration.
2022-04-22 15:22:37.478Z INFO landscape-setup "Checking package database initial data ..."
2022-04-22 15:22:37.496Z INFO landscape-setup "Package database already initialized."
2022-04-22 15:22:37.497Z INFO landscape-setup "Renaming stock hash-id stores ..."
2022-04-22 15:22:37.497Z INFO landscape-setup "Stock package database not loaded, ignoring stock hash-id stores."
Job for landscape-
See "systemctl status landscape-
invoke-rc.d: initscript landscape-
* landscape-
Loaded: loaded (/lib/systemd/
Active: activating (auto-restart) (Result: exit-code) since Fri 2022-04-22 11:22:43 EDT; 10ms ago
Process: 7337 ExecStartPre=
Apr 22 11:22:43 landscape systemd[1]: landscape-
Apr 22 11:22:43 landscape systemd[1]: Failed to start Landscape's Package Search daemon.
dpkg: error processing package landscape-server (--configure):
installed landscape-server package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of landscape-
landscape-
Package landscape-server is not configured yet.
dpkg: error processing package landscape-
dependency problems - leaving unconfigured
Errors were encountered while processing:
landscape-server
landscape-
E: Sub-process /usr/bin/dpkg returned an error code (1)
information type: | Proprietary → Public |
This also happens for a manually deployed on-prem server. Following the instructions here: https:/ /docs.ubuntu. com/landscape/ en/ReleaseNotes 19.10 gives the following result when running setup-landscape -server:
$ setup-landscape -server /landscape/ canonical/ landscape/ scripts/ standalone/ plugins/ database. py", line 478, in update_schema run(args= args) /landscape/ canonical/ landscape/ scripts/ schema. py", line 280, in run config( "schema" ) /landscape/ canonical/ landscape/ setup.py" , line 231, in load_config instance_ type) /landscape/ canonical/ landscape/ setup.py" , line 124, in read_config letter" : chr(64 + instance)}) ..\n1\n"
2022-04-27 15:16:19.022Z INFO landscape-setup "Bootstrapping from service.conf file ..."
2022-04-27 15:16:19.032Z INFO landscape-setup "Skipping configuration migration ..."
2022-04-27 15:16:19.033Z INFO landscape-setup "Checking Landscape databases ..."
2022-04-27 15:16:19.039Z INFO landscape-setup "Checking database schema ..."
2022-04-27 15:16:19.049Z ERROR landscape-setup "Encountered database error"
Traceback (most recent call last):
File "/opt/canonical
schema.
File "/opt/canonical
load_
File "/opt/canonical
config = setup_config(
File "/opt/canonical
"instance-
ValueError: unsupported format character 't' (0x74) at index 82
2022-04-27 15:16:19.049Z INFO landscape-setup "Schema configuration output:\n\nLoading site configuration.
2022-04-27 15:16:19.050Z INFO landscape-setup "Checking package database initial data ..."
2022-04-27 15:16:19.058Z INFO landscape-setup "Package database already initialized."
2022-04-27 15:16:19.058Z INFO landscape-setup "Renaming stock hash-id stores ..."
2022-04-27 15:16:19.064Z INFO landscape-setup "No stock file to rename"
I have checked the database server and it has the correct version of postgresql- plpython- 10 installed.