Skip to content

Commit

Permalink
rootless: set LocalStorageCapacityIsolation=false to avoid "could not…
Browse files Browse the repository at this point in the history
… find device ..." error

For avoiding err="failed to get rootfs info: failed to get device for dir \"/var/lib/kubelet\": could not find device with major: 0, minor: 41 in cached partitions map"

Fix issue 2524

See https://github.com/kubernetes/kubernetes/blob/v1.22.2/pkg/kubelet/cm/container_manager_linux.go#L641-L649

Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Dec 2, 2021
1 parent 81b392d commit ab38ef8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cluster/internal/kubeadm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,10 @@ func Config(data ConfigData) (config string, err error) {
return "", errors.Errorf("version %q is not compatible with rootless provider (hint: kind v0.11.x may work with this version)", ver)
}
data.FeatureGates["KubeletInUserNamespace"] = true

// For avoiding err="failed to get rootfs info: failed to get device for dir \"/var/lib/kubelet\": could not find device with major: 0, minor: 41 in cached partitions map"
// https://github.com/kubernetes-sigs/kind/issues/2524
data.FeatureGates["LocalStorageCapacityIsolation"] = false
}

// assume the latest API version, then fallback if the k8s version is too low
Expand Down

0 comments on commit ab38ef8

Please sign in to comment.