zalando / zalando/postgres-operator

InitDB not initializing dueto mkdir: cannot create directory ‘/home/postgres/pgdata/pgroot’: Read-only file system

Open
#2,023 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.2k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
3

Description

Please, answer some short questions which should help us to understand your problem / question better?

  • Which image of the operator are you using? registry.opensource.zalan.do/acid/spilo-14:2.1-p6
  • **Where do you run it - cloud or metal? Kubernetes on a VM [1 master, 2 worker nodes]
  • Are you running Postgres Operator in production? [no]
  • Type of issue? [Bug report]

I am performing a manuall installation of postgres cluster based on Zalando quick start guide using URL https://github.com/zalando/postgres-operator/blob/master/docs/quickstart.md

FYI - I have used PVC claimed using Trident.

I have followed all the steps but the pod is not in ready status.

NAME READY STATUS RESTARTS AGE
acid-minimal-cluster-0 0/1 Running 0 120m

The container logs shows the following error

kubectl logs acid-minimal-cluster-0 -c postgres
mkdir: cannot create directory ‘/home/postgres/pgdata/pgroot’: Read-only file system
mkdir: cannot create directory ‘/home/postgres/pgdata/pgroot’: Read-only file system
touch: cannot touch '/home/postgres/pgdata/pgroot/pg_log/postgresql-0.csv': No such file or directory

Please find below the Postgres operator status

kubectl get pod -l name=postgres-operator
NAME READY STATUS RESTARTS AGE
postgres-operator-6b8c5c9656-4bl26 1/1 Running 1 (3h30m ago) 3h30m

kubectl get postgresql
NAME TEAM VERSION PODS VOLUME CPU-REQUEST MEMORY-REQUEST AGE STATUS
acid-minimal-cluster acid 14 2 1Gi 152m SyncFailed

Could you please help on this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docs/quickstart.md and the reported kubectl logs for acid-minimal-cluster-0. Check how the Trident PVC is mounted and why /home/postgres/pgdata is read-only, then verify the pod becomes ready and the PostgreSQL resource leaves SyncFailed.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, postgresql
Domain
databases, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.