Source: patroni
Version: 1.6.4-1
Severity: normal
Tags: patch

When rerunning `pg_createconfig_patroni --force` as would happen when rerunning
an ansible playbook [1], pg_createconfig_patroni will not clear the vip
config file (/etc/patroni/11-test.vip or similar) as it does with the
patroni cluster config file (/etc/patroni/11-test.yml or similar).

I suggest treating the VIP config file the same as the patroni cluster
config file, i.e. :

    @@ -89,6 +85,15 @@
     # 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
    +

***Thanks a lot for maintaining patroni*** !!!!
*t

[1] https://github.com/credativ/ansible-playbook-patroni-debian

-- System Information:
Debian Release: 10.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-8-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_CH.utf8, LC_CTYPE=de_CH.utf8 (charmap=UTF-8), LANGUAGE=de_CH:de 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Reply via email to