kubernetes-csi / csi-driver-host-path

A sample (non-production) CSI Driver that creates a local directory as a volume on a single node
Apache License 2.0
330 stars 211 forks source link

Snapshot fails if a file is deleted concurrently #542

Closed mnencia closed 4 months ago

mnencia commented 4 months ago

In CNPG E2E tests, we take several snapshots of a running PostgreSQL cluster. Sometimes, the snapshot fails because a file is deleted between when tar gathers the file list and when it is read. This is an example of the failure:

can't execute snapshot backup: Failed to create snapshot: failed to take snapshot of the volume a62e8015-3ab3-11ef-813a-829810a7d821: "rpc error: code = Unknown desc = failed create snapshot: exit status 1: tar: ./pgdata/base/1/pg_internal.init: No such file or directory\ntar: error exit delayed from previous errors\n"

The file pg_internal.init is the PostgreSQL relation cache and is deleted and recreated during PostgreSQL startup.

leonardoce commented 4 months ago

/assign