mdeslaur suggested that it uses pyscopg2
And indeed I can find that in the snap:
$ find /snap/maas/ -type d| grep psycopg2
/snap/maas/15003/usr/lib/python3/dist-packages/django/db/backends/postgresql_psycopg2
/snap/maas/15003/usr/lib/python3/dist-packages/django/db/backends/postgresql_psycopg2/__pycache__
/snap/maas/15003/usr/lib/python3/dist-packages/psycopg2
/snap/maas/15003/usr/lib/python3/dist-packages/psycopg2/__pycache__
/snap/maas/15003/usr/lib/python3/dist-packages/psycopg2-2.8.4.egg-info
And that is a wrapper for libpq:
In the snap is
/snap/maas/15003/usr/lib/x86_64-linux-gnu/libpq.so.5.12
But I wonder which access method from snap to host-sql-server would
share a namespace so that the old lib (in snap) would collide with the
new lib (host).
I was trying that in snap run --shell but it won't work.
root@f-pgdebug:/# python3
Python 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg2
>>> conn = psycopg2.connect("dbname=maasdb user=maasdb")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/snap/maas/15003/usr/lib/python3/dist-packages/psycopg2/__init__.py",
line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I'd want/need to understand how exactly maas would do the connection.
Is it maybe keeping an old connection up?
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1939898
Title:
Unnatended postgresql-12 upgrade caused MAAS internal error
To manage notifications about this bug go to:
https://bugs.launchpad.net/maas/+bug/1939898/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs