/usr/bin/landscape-schema fails with database is not currently accepting connections
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Server |
New
|
Undecided
|
Unassigned |
Bug Description
Running a migration from 19.10, bionic, pgsql 10 to 23.03, pgsql 12, focal trying to run the /usr/bin/
Traceback (most recent call last):
File "/opt/canonical
main_
File "/usr/lib/
raise UnappliedPatche
storm.schema.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/
yield
File "/usr/lib/
return attr(*args, **kwargs)
psycopg2.
CONTEXT: parallel worker
seems that if it's charm installed (and in my case it is), the following code is ran locking all dbs in https:/
if is_charm_
try:
ensure_
but because there are no connections made to any db prior to that (my testing indicates that with SELECT * FROM pg_stat_activity), this raises an error above and doesn't continue the schema upgrade
Commenting out the ensure_ no_other_ connections( zstorm) and adding pass the schema upgrade works just fine.