Closed cazter closed 6 months ago
I think this is a limitation of StatefulSets that don't transition well when adding a fsGroup after they have been created. I don't remember where I have seen that unfortunately.
@zimbatm I have a cluster where this happens each time the operator restarts the pods. I have deleted the statefulset to let the operator create it anew, and it still happens.
A contact noticed a workaround to the problem: https://github.com/zalando/patroni/commit/7e170928093f31da7b64086d515108f1fd7efab1 It seems to help: After restarting pods, patronictl shows db nodes in normal state. On the linked page side note: "This error does not occur when using shared filesystems (like NFS)"
Hi @zimbatm and all, as @Samusername specified, this new spilo image which does chmod accordingly at startup would solve this issue: registry.opensource.zalan.do/acid/spilo-cdp-12:1.6-p114 # or newer
To get the latest versions of the images of both operator and spilo, do: https://registry.opensource.zalan.do/v2/acid/postgres-operator/tags/list https://registry.opensource.zalan.do/v2/acid/spilo-cdp-12/tags/list https://registry.opensource.zalan.do/v2/acid/spilo-12/tags/list #The usual release branch
While a new cluster will initialize, any existing cluster or rather any event that causes the pods to recreate causes the following permissions issue preventing the cluster from initializing:
Additionally, you're unable to access a shell via kubectl as the pod is running outside the root user.