Skip to content

Commit 72199ab

Browse files
committed
WSL: kube: Add comment on why we need to remove kube cgroups
Signed-off-by: Mark Yen <mark.yen@suse.com>
1 parent 8417ef8 commit 72199ab

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

.github/actions/spelling/expect.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ KONTANIER
425425
kotlin
426426
ksh
427427
Kubectx
428+
kubepods
428429
kuberlr
429430
Kubewarden
430431
kurrent

pkg/rancher-desktop/backend/kube/wsl.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ export default class WSLKubernetesBackend extends events.EventEmitter implements
216216
}
217217
this.cfg = config;
218218

219+
// Clean up kubernetes cgroups before we start, as Kubernetes 1.31.0+ fails
220+
// to start if these are left over. We need to remove all cgroups named
221+
// "kubepods" as well as their descendants (which are expected to all be
222+
// empty).
219223
await this.progressTracker.action('Removing stale state', 50,
220224
this.vm.execCommand('busybox', 'find', '/sys/fs/cgroup', '-name', 'kubepods', '-exec',
221225
'busybox', 'find', '{}', '-type', 'd', '-delete', ';', '-prune'));

0 commit comments

Comments
 (0)