Repository navigation
Closed as not planned
Labels
triagePending triage
Description
Is there an existing issue already for this bug?
- I have searched for an existing issue, and could not find anything. I believe this is a new bug.
I have read the troubleshooting guide
- I have read the troubleshooting guide and I think this is a new bug.
I am running a supported version of CloudNativePG
- I have read the troubleshooting guide and I think this is a new bug.
Contact Details
No response
Version
1.25 (latest patch)
What version of Kubernetes are you using?
1.32
What is your Kubernetes environment?
Cloud: Azure AKS
How did you install the operator?
Helm
What happened?
The cluster was running fine for more than a week, but suddenly the primary instances runs out of WAL disk space.
dev@zeta-gpu:/code/zeta$ kubectl cnpg status zeta-main-k8s-beta-postgres -n zeta-postgres
Cluster Summary
Name zeta-postgres/zeta-main-k8s-beta-postgres
System ID: 7455388899635355666
PostgreSQL Image: cloudzeta/zeta-postgres:15.1.1.78-42f0588b
Primary instance: zeta-main-k8s-beta-postgres-2
Primary start time: 2025-03-15 06:04:31 +0000 UTC (uptime 14m56s)
Status: Not enough disk space Insufficient disk space detected in one or more pods is preventing PostgreSQL from running.Please verify your storage settings. Further information inside .status.instancesReportedState
Instances: 2
Ready instances: 1
Size: 1.2G
Current Write LSN: 18/D5008250 (Timeline: 10 - WAL File: 0000000A00000018000000D5)
Continuous Backup status
First Point of Recoverability: 2025-03-08T00:42:02Z
Working WAL archiving: OK
WALs waiting to be archived: 0
Last Archived WAL: 0000000A00000018000000D4 @ 2025-03-15T06:09:32.305248Z
Last Failed WAL: 0000000A.history @ 2025-03-15T06:04:30.636916Z
Streaming Replication status
Not available yet
Instances status
Name Current LSN Replication role Status QoS Manager Version Node
---- ----------- ---------------- ------ --- --------------- ----
zeta-main-k8s-beta-postgres-2 18/D5008250 Primary OK Burstable 1.25.1 aks-postgres-13560037-vmss000003
zeta-main-k8s-beta-postgres-1 - - - ServiceUnavailable Burstable - aks-postgres-13560037-vmss000004
Error(s) extracting status
-----------------------------------
failed to get status by proxying to the pod, you might lack permissions to get pods/proxy: the server is currently unable to handle the request (get pods https:zeta-main-k8s-beta-postgres-1:8000)
dev@zeta-gpu:/code/zeta$ kubectl logs zeta-main-k8s-beta-postgres-1 -n zeta-postgres
{"level":"info","ts":"2025-03-15T06:13:01.027910586Z","msg":"Starting CloudNativePG Instance Manager","logger":"instance-manager","logging_pod":"zeta-main-k8s-beta-postgres-1","version":"1.25.1","build":{"Version":"1.25.1","Commit":"c56e00d4","Date":"2025-02-28"}}
{"level":"info","ts":"2025-03-15T06:13:01.027927091Z","msg":"Checking for free disk space for WALs before starting PostgreSQL","logger":"instance-manager","logging_pod":"zeta-main-k8s-beta-postgres-1"}
{"level":"info","ts":"2025-03-15T06:13:01.030911362Z","msg":"Detected low-disk space condition, avoid starting the instance","logger":"instance-manager","logging_pod":"zeta-main-k8s-beta-postgres-1"}
dev@zeta-gpu:/code/zeta$ kubectl get backup -n zeta-postgres
zeta-main-k8s-beta-postgres-hourly-backup-20250314224200 7h41m zeta-main-k8s-beta-postgres barmanObjectStore completed
zeta-main-k8s-beta-postgres-hourly-backup-20250314234200 6h41m zeta-main-k8s-beta-postgres barmanObjectStore completed
zeta-main-k8s-beta-postgres-hourly-backup-20250315004200 5h41m zeta-main-k8s-beta-postgres barmanObjectStore completed
zeta-main-k8s-beta-postgres-hourly-backup-20250315014200 4h41m zeta-main-k8s-beta-postgres barmanObjectStore walArchivingFailing
zeta-main-k8s-beta-postgres-hourly-backup-20250315024200 3h41m zeta-main-k8s-beta-postgres barmanObjectStore walArchivingFailing
zeta-main-k8s-beta-postgres-hourly-backup-20250315034200 161m zeta-main-k8s-beta-postgres barmanObjectStore walArchivingFailing
zeta-main-k8s-beta-postgres-hourly-backup-20250315044200 101m zeta-main-k8s-beta-postgres barmanObjectStore walArchivingFailing
zeta-main-k8s-beta-postgres-hourly-backup-20250315054200 41m zeta-main-k8s-beta-postgres barmanObjectStore walArchivingFailing
Originally, we thought this was related to #6544
However, it happened again in 1.25.1
Cluster resource
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
triagePending triage
Activity
gbartolini commentedon Mar 17, 2025
Hi @thearperson, thank you for contacting us. Could you clarify whether you ran out of disk space, as indicated by the log excerpt?
thearperson commentedon Mar 18, 2025
Yeah, we ran out of disk space. However, it turns out we cannot really access the pod:
so it's hard to tell the true disk usage situation.
gbartolini commentedon Mar 20, 2025
Did you go through this? https://cloudnative-pg.io/documentation/current/instance_manager/#disk-full-failure
thearperson commentedon Mar 21, 2025
No, we haven't tried to increate the PVC size. Will try that next time it happens.
What we did isn't to
helm uninstallthe cluster and use barman to recover.gbartolini commentedon Mar 24, 2025
Thank you. Given that the behaviour is expected, I am closing this bug.
thearperson commentedon Apr 4, 2025
@gbartolini this issue occurred again today and we managed to get the system recovered with:
However, after the pod recovers, we inspect the storage usage:
It seems the usage is indeed really low. Wondering whether it's possible that something triggered a spike in the storage usage?