diff --git a/debian/changelog b/debian/changelog index 0a08df8..c2b94b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 10 Feb 2020 10:03:07 +0100 diff --git a/debian/pg_createconfig_patroni b/debian/pg_createconfig_patroni index dff9b37..840e9ac 100755 --- a/debian/pg_createconfig_patroni +++ b/debian/pg_createconfig_patroni @@ -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