Skip to content

Commit be943a0

Browse files
authored
Merge pull request #8683 from mook-as/kube-cgroup-delete
[1.19] Kube cgroup delete
2 parents d0d395a + 72199ab commit be943a0

2 files changed

Lines changed: 9 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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,14 @@ 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).
223+
await this.progressTracker.action('Removing stale state', 50,
224+
this.vm.execCommand('busybox', 'find', '/sys/fs/cgroup', '-name', 'kubepods', '-exec',
225+
'busybox', 'find', '{}', '-type', 'd', '-delete', ';', '-prune'));
226+
219227
const executable = config.containerEngine.name === ContainerEngine.MOBY ? 'docker' : 'nerdctl';
220228

221229
await this.vm.verifyReady(executable, 'images');

0 commit comments

Comments
 (0)