Hi,
I feel something is missing in generic instructions.
i tried to follow the setup explained in the
link. Then i tried to use a generic chart for stable/stolon with minimal alterations. in all scenarios i get properly started set of pods but i am unable to connect to the db - not from the outside, nor from inside of the keeper pod. i presume it is due to the fact that the actual postgresql is not running at all, despite of the chart startup. it must be something trivial that is missed but i am not able to see what is missing.
the startup below states that cluster was initialized - is it not true? i run it all with helm 3.1.1 and a rancher system on top of k8s.
chart is taken from: charts/stable/stolon at master · helm/charts · GitHub
to reduce changes to minimum i only tried to alter passwords and
clusterSpec:
synchronousReplication: true
minSynchronousStandbys: 1 # quorum-like replication
maxSynchronousStandbys: 1 # quorum-like replication
initMode: new
...
keeping rest of the chart untouched - but it still produces same exact outcome. pls advice what is the issue there.
helm install pg --namespace stolon -f values.yaml ~/stolon/
NAME: pg
LAST DEPLOYED: Thu May 21 20:33:23 2020
NAMESPACE: stolon
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Stolon cluster installed and initialized.
To get superuser password run
PGPASSWORD=$(kubectl get secret --namespace stolon stolon -o jsonpath="{.data.password}" | base64 --decode; echo)
[rancher@rancher stolon]$ PGPASSWORD=$(kubectl get secret --namespace stolon stolon -o jsonpath="{.data.password}" | base64 --decode; echo)
[rancher@rancher stolon]$ kubectl -n stolon get all
NAME READY STATUS RESTARTS AGE
pod/pg-stolon-create-cluster-vtftz 0/1 Completed 0 21s
pod/pg-stolon-keeper-0 1/1 Running 0 21s
pod/pg-stolon-keeper-1 1/1 Running 0 18s
pod/pg-stolon-keeper-2 1/1 Running 0 16s
pod/pg-stolon-proxy-6c547c86b-rgx6s 1/1 Running 0 21s
pod/pg-stolon-proxy-6c547c86b-swc5b 1/1 Running 0 21s
pod/pg-stolon-proxy-6c547c86b-vbzx2 1/1 Running 0 21s
pod/pg-stolon-sentinel-d86997dcb-slk6v 1/1 Running 0 21s
pod/pg-stolon-sentinel-d86997dcb-v296g 1/1 Running 0 21s
pod/pg-stolon-sentinel-d86997dcb-zhd9n 1/1 Running 0 21s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/pg-stolon-keeper-headless ClusterIP None <none> 5432/TCP 21s
service/pg-stolon-proxy ClusterIP 10.43.110.219 <none> 5432/TCP 21s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/pg-stolon-proxy 3/3 3 3 21s
deployment.apps/pg-stolon-sentinel 3/3 3 3 21s
NAME DESIRED CURRENT READY AGE
replicaset.apps/pg-stolon-proxy-6c547c86b 3 3 3 21s
replicaset.apps/pg-stolon-sentinel-d86997dcb 3 3 3 21s
NAME READY AGE
statefulset.apps/pg-stolon-keeper 3/3 21s
NAME COMPLETIONS DURATION AGE
job.batch/pg-stolon-create-cluster 1/1 1s 21s
[rancher@rancher stolon]$ kubectl -n stolon exec -it pg-stolon-keeper-0 -- psql --host 10.43.110.219 --port 5432 --username superuser_name -W
Password for user superuser_name:
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
command terminated with exit code 2