Package: patroni Version: 1.6.1-1.pgdg100+1 Hi,
we were trying to setup a patroni cluster with a scope name of "11-psql-ppo01". This ended up building a cluster of version 11, named "ppo01", and then obviously mismatching datadirs etc. Please consider applying the attached patch. Thanks, Chris
--- pg_createcluster_patroni~ 2019-12-04 13:30:07.000000000 +0100 +++ pg_createcluster_patroni 2019-12-04 13:28:31.000000000 +0100 @@ -20,11 +20,11 @@ # support both '-' and '/' as separator if [ $(echo $SCOPE | grep -- -) ] then - VERSION=$(echo $SCOPE | sed -e 's/-.*//') - CLUSTER=$(echo $SCOPE | sed -e 's/.*-//') + VERSION=$(echo $SCOPE | cut -d'-' -f1 ) + CLUSTER=$(echo $SCOPE | cut -d'-' -f2- ) else - VERSION=$(echo $SCOPE | sed -e 's/\/.*//') - CLUSTER=$(echo $SCOPE | sed -e 's/.*\///') + VERSION=$(echo $SCOPE | cut -d'/' -f1 ) + CLUSTER=$(echo $SCOPE | cut -d'/' -f2- ) fi pg_createcluster --start-conf=manual $VERSION $CLUSTER