[Pkg-postgresql-public] Bug#856423: postgresql-plproxy: autopkgtest failures since move to newnet (2.6-2)
Nishanth Aravamudan
nish.aravamudan at canonical.com
Tue Feb 28 22:07:16 UTC 2017
Package: postgresql-plproxy
Version: 2.7-1
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu zesty ubuntu-patch
Dear Maintainer,
The autopkgtests for postgresql-plproxy have been failing ever since
2.6-2 because postgres is not network namespace aware.
In Ubuntu, the attached patch was applied to achieve the following:
* d/t/installcheck fixes:
- Passing a port to pg_virtualenv even with newnet does not avoid
port collisions, as pg_virtualenv (via pg_createcluster) is only
looking at the configured clusters on the filesystem, not what is
running in the current network namespace. Set an alternative
PG_CLUSTER_CONF_ROOT instead, and set it before we call
pg_virtualenv.
- Set the socket directory for pg_createcluster, as we are using the
standard port and that can lead to conflicts. This also requires
making the AUTOPKGTEST_TMP directory world-writeable so the
postgres user can write socket information there.
Thanks for considering the patch.
*** /tmp/tmpnVHESZ/postgresql-plproxy_2.7-1ubuntu1.debdiff
diff -Nru postgresql-plproxy-2.7/debian/tests/installcheck postgresql-plproxy-2.7/debian/tests/installcheck
--- postgresql-plproxy-2.7/debian/tests/installcheck 2016-09-25 14:04:41.000000000 -0700
+++ postgresql-plproxy-2.7/debian/tests/installcheck 2017-02-28 10:19:53.000000000 -0800
@@ -21,9 +21,19 @@
;;
esac
- if ! newnet pg_virtualenv -c '-p 5432 --locale C' -i '--auth trust' -v $v \
- make -f $PWD/Makefile \
- installcheck PG_CONFIG=/usr/lib/postgresql/$v/bin/pg_config; then
+ # AUTOPKGTEST_TMP is not writeable by any user except root, but
+ # we want to use it for storing the Postgres socket
+ # Set PG_CLUSTER_CONF_ROOT, because although we are running in a
+ # network namespace (so we can reuse the default port),
+ # pg_virtualenv/pg_createcluster looks at the configured
+ # databases on the filesystem
+ # Set the socket directory because we are to re-use the port and
+ # there can be conflicts in the normal socket directory
+ if ! chmod o+w $AUTOPKGTEST_TMP && \
+ PG_CLUSTER_CONF_ROOT=$AUTOPKGTEST_TMP \
+ PG_CONFIG=/usr/lib/postgresql/$v/bin/pg_config \
+ newnet pg_virtualenv -c "-p 5432 --locale C -s $AUTOPKGTEST_TMP" -i '--auth trust' -v $v \
+ make -f $PWD/Makefile installcheck; then \
head -n 500 regression.diffs
exit 1
fi
-- System Information:
Debian Release: stretch/sid
APT prefers zesty
APT policy: (500, 'zesty')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.10.0-8-generic (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
--
Nishanth Aravamudan
Ubuntu Server
Canonical Ltd
More information about the Pkg-postgresql-public
mailing list