* debian/pg_createcluster_patroni: remove vip-manager file before appending

to it, patch by Tomas Pospisek (Closes: #953147).
This commit is contained in:
Michael Banck 2020-03-19 19:15:11 +01:00
parent f871088904
commit 929e69dd0a
2 changed files with 9 additions and 0 deletions

2
debian/changelog vendored
View file

@ -3,6 +3,8 @@ patroni (1.6.4-2) UNRELEASED; urgency=medium
[ Michael Banck ]
* debian/pg_clonecluster_patroni: quote connstr in pg_createcluster
invocation (Closes: #953623).
* debian/pg_createcluster_patroni: remove vip-manager file before appending
to it, patch by Tomas Pospisek (Closes: #953147).
-- Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org> Mon, 10 Feb 2020 10:03:07 +0100

View file

@ -89,6 +89,13 @@ DCS_CONFIG="$(egrep -v '^[[:space:]]*$|^ *#' /etc/patroni/dcs.yml | sed -e ':a;N
# check vip configuration
if [ -n "$VIP_IP" ]; then
VIP_FILE=/etc/patroni/${VERSION}-${CLUSTER}.vip
if [ -f $VIP_FILE -a -z "$FORCE" ]; then
echo "VIP configuration file already exists"
exit 1
else
rm -f $VIP_FILE
touch $VIP_FILE
fi
if [ ! -e /etc/patroni/vip.in ]; then
echo "VIP template /etc/patroni/vip.in does not exist, cannot write VIP file"
exit 1