-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gce-pd-driver container OOM killed after upgrade to GKE 1.28 #1782
Comments
I now think the key part is that I take a "GCE disk snapshot" and then restore a volume from that snapshot. When the GCE disk snapshot is performed, I guess the FS still have the "needs recovery" bit set (that bit, if I understand correctly, is unset when the FS is properly unmounted), so on next |
The OOMs are a known issue, and we've been trying to fix them (eg, #1168). The fsck one is harder, though, and we are currently trying to find a solution. The best way to increase the memory for a daemonset instance is to use a mutating webhook. Let me know if you need more details. There's no way for GKE to manually change the daemonset configuration as it turns out. You've also run into another known sharp edge with snapshots -- they're hard to do online. To avoid neediing to recover the journal on the snapshot, you need either to do them offline (ie, after unmounting), or to quiesce & freeze the volume (which is no possible to do without being a privileged pod). This is a known problem (see kubernetes-csi/external-snapshotter#566 (comment), for example), and unfortunately there's no clear path forward. |
Thanks ! I'll look into it !
Something, someone decided that 50MB should be the memory limit for the
Yeah but for a mission-critical OLTP DB, it's not practical.
Yep. I am using PostgreSQL which is okay-ish with the disk snapshot as they are (without What bugs me a little is that my "take a disk snapshot and assess PG can recover from that disk snapshot" script used to work fine until GKE v1.28. Something must have changed between v1.27 and v1.28, and now the OOM killer decides more-often-than-not to also kill the |
Most workloads use far less then 50M, increasing the limit makes that memory unusable for user workloads on all nodes on all clusters. We're trying to find a more efficient solution.
Yeah, understood.
Yeah, that's interesting as we'd also only seen the fsck process get oom killed. If it's the kernel oom killer, then I don't think it's due to a change in the kubelet. Maybe it's a cos issue, although the obvious thing, upgrade to cgroup v2, happened in 1.26. |
Do you have the exact 1.27 and 1.28 gke versions you were on (eg v1.27.10-gke.1055000)? |
Not exactly. I am now running
It looks like this is going to work. We have a mutating webhook to increase the container memory limit working in a staging cluster. |
Edit: I finally found it somewhere. We were running |
Ah, I wonder if it's kubernetes/kubernetes#117070.
Let me do some more spelunking. Thank you for the cluster versions you were
running, that's very helpful.
…On Tue, Jul 16, 2024 at 1:12 PM Jordan Pittier ***@***.***> wrote:
Edit: I finally found it somewhere. We were running 1.27.11-gke.1062004
—
Reply to this email directly, view it on GitHub
<#1782 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJCBAETEOBSBH3KSCPYZDLZMV5BFAVCNFSM6AAAAABKS2CVFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZRG42DMOJTGM>
.
You are receiving this because you commented.Message ID:
<kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/issues/1782/2231746933
@github.com>
|
Yes, I think this explains the reason why both processes are killed:
kubernetes/kubernetes#117793
The change seems to have happened in 1.28 which explains your problems.
…On Tue, Jul 16, 2024 at 1:18 PM Matthew Cary ***@***.***> wrote:
Ah, I wonder if it's
kubernetes/kubernetes#117070. Let me do some
more spelunking. Thank you for the cluster versions you were running,
that's very helpful.
On Tue, Jul 16, 2024 at 1:12 PM Jordan Pittier ***@***.***>
wrote:
> Edit: I finally found it somewhere. We were running 1.27.11-gke.1062004
>
> —
> Reply to this email directly, view it on GitHub
> <#1782 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AIJCBAETEOBSBH3KSCPYZDLZMV5BFAVCNFSM6AAAAABKS2CVFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZRG42DMOJTGM>
> .
> You are receiving this because you commented.Message ID:
> <kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/issues/1782/2231746933
> @github.com>
>
|
I implemented the workaround described here and it solved my issue. |
Thank you @mattcary, you helped me a lot and you found the root cause 🍻 |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/lifecycle frozen |
Maybe this daemonset should not limit memory at all? pdcsi-node can contain not only fsck, but also resize2fs, and if you will kill it, then you should expect all sort of troubles |
We should at least have a way to resize and allocate more memory for it! |
We've found increasing the memory limit to ~500M works well, and hasn't seemed to have an adverse affect on other workloads on the node. @acondrat the memory resource can be controlled by editing deploy/kubernetes/base/node_linux/node.yaml. |
I've been running into the same issue the past few weeks with the latest stable release GKE version (1.30.5-gke.1014001). I can attach 8 TB hyperdisks to c4 machines just fine, but as soon as I increase the disk size beyond that (e.g. 9 TB) this driver will OOM 100% of the time and get stuck in a loop in what appears to be attempts to run a I haven't been able to find a solution beyond avoiding larger disk sizes; this seems like a config fix GCP needs to deploy for GKE, or at least make it straightforward for users to configure. |
See details for GKE mitigation and fix rollout in https://issuetracker.google.com/issues/338125229. |
Upgrading to 1.31.1-gke.1678000 fixed the issue :) |
Hi,
You probably have not control over how the
pd-csi
daemonset is deployed on GKE, but I am taking my chance.After upgrading to GKE 1.28, some
gce-pd-driver
containers started to be OOM killed. Before getting killed, the last log line isChecking for issues with fsck on disk: /dev/disk/by-id/google-restore-aus-southeast1-fcb9-pg-data-pg-main-0-7279
. That disk is a multi TB disk attached to a pod. My guess is 50MB (resources.memory.limit set by GKE for thatgce-pd-driver
container) is not enough to runfsck
on such a large disk.Any chance you could reach to someone at GKE to increase that memory limit (although baseline usage, fsck excepted is ~10MB so 50MB seems reasonable) ? Or how could I skip that
fsck
check ?If that helps, this is part of my Go code (running elsewhere) that seems to, down the line, trigger the call to
fsck
.Thanks !
(please, don't recommend I reach to my TAM at GCP, we don't have one haha)
The text was updated successfully, but these errors were encountered: