You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Fencing is unreachable when WAL disk is full #10299
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.
Version
trunk (main)
What version of Kubernetes are you using?
1.32
What is your Kubernetes environment?
Other
How did you install the operator?
Other
What happened?
When the WAL disk is full, the instance manager performs a disk space check at cmd.go:182-189 and calls os.Exit(4)before the controller-runtime manager starts. Because the manager never starts, the reconciler that processes fencing annotations never runs. This means fencing cannot be applied to instances with a full WAL disk, making it impossible to recover the cluster through fencing.
Expected behavior: The instance manager should always start the controller-runtime manager so that fencing annotations are processed regardless of WAL disk space. The WAL disk space check should happen later, before starting PostgreSQL, not before starting the manager.
Root cause: In internal/cmd/manager/instance/run/cmd.go, the WAL space check runs as a pre-start gate before mgr.Start(). The fencing logic lives inside the lifecycle's runPostgresAndWait, which is only reachable after the manager starts.
Activity
fix(fencing): allow fencing when WAL disk is full
fix(fencing): allow fencing when WAL disk is full