cloudnative-pg icon indicating copy to clipboard operation
cloudnative-pg copied to clipboard

feat: introduce WAL archive volume

Open armru opened this issue 3 years ago • 18 comments

Closes #10

Signed-off-by: Armando Ruocco [email protected]

armru avatar Aug 02 '22 08:08 armru

/test

armru avatar Aug 02 '22 09:08 armru

@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2781171804

cnpg-bot avatar Aug 02 '22 09:08 cnpg-bot

I have made some minor changes in the preferred location. I suggest that the "pg_wal" volume is a sibling of the PGDATA one. What is missing now is the invocation of the initdb parameter with --waldir option (see https://www.postgresql.org/docs/current/app-initdb.html)

gbartolini avatar Aug 02 '22 13:08 gbartolini

/test

armru avatar Aug 02 '22 14:08 armru

@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2782889739

cnpg-bot avatar Aug 02 '22 14:08 cnpg-bot

/test

armru avatar Aug 02 '22 16:08 armru

@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2783635174

cnpg-bot avatar Aug 02 '22 16:08 cnpg-bot

/test

armru avatar Aug 02 '22 20:08 armru

@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2785051386

cnpg-bot avatar Aug 02 '22 20:08 cnpg-bot

I think we need to improve the DetectPVCs function too, because we can't reattach a PVC of a data directory if we don't have the corresponding WAL volume.

leonardoce avatar Aug 03 '22 09:08 leonardoce

$ k get pvc -w
NAME                       STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
cluster-example-1          Bound    pvc-a419cd79-d644-4234-82fa-fd3f6dacdd14   1Gi        RWO            standard       4s
pg-wal-cluster-example-1   Bound    pvc-4e07f615-f3ac-4d08-bff1-d935e09c9cec   1Gi        RWO            standard       4s
cluster-example-1          Bound    pvc-a419cd79-d644-4234-82fa-fd3f6dacdd14   1Gi        RWO            standard       11s

I think our users are used to have the resources created by Cluster having the same prefix. This is what happens usually in Kubernetes.

Perhaps we could have cluster-example-1-wal as a name, instead of pg-wal-cluster-example-1

leonardoce avatar Aug 03 '22 09:08 leonardoce

We should think about the meaning of the DanglingPVC, ResizingPVC, InitializingPVC, HealthyPVC fields too. In this moment ResizingPVC is considering the WAL PVCs too, while the other ones are not including it.

leonardoce avatar Aug 03 '22 09:08 leonardoce

/test

armru avatar Aug 04 '22 08:08 armru

@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2795289801

cnpg-bot avatar Aug 04 '22 08:08 cnpg-bot

/test

armru avatar Aug 04 '22 14:08 armru

@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2797278319

cnpg-bot avatar Aug 04 '22 14:08 cnpg-bot

/test

armru avatar Aug 05 '22 12:08 armru

@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2803610447

cnpg-bot avatar Aug 05 '22 12:08 cnpg-bot

/test

jsilvela avatar Aug 10 '22 14:08 jsilvela

@jsilvela, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2833398328

cnpg-bot avatar Aug 10 '22 14:08 cnpg-bot