Skip to content

Commit f1d63df

Browse files
authored
Merge pull request #12990 from spowelljr/btrfsErrorMessage
Add advice if user using btrfs storage driver
2 parents cb8c008 + c8fbd6e commit f1d63df

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Diff for: cmd/minikube/cmd/start_flags.go

+7
Original file line numberDiff line numberDiff line change
@@ -516,12 +516,19 @@ func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, drvName s
516516
// See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-in-userns/
517517
cc.KubernetesConfig.FeatureGates = addFeatureGate(cc.KubernetesConfig.FeatureGates, "KubeletInUserNamespace=true")
518518
}
519+
if si.StorageDriver == "btrfs" {
520+
klog.Info("auto-setting LocalStorageCapacityIsolation to false because using btrfs storage driver")
521+
cc.KubernetesConfig.FeatureGates = addFeatureGate(cc.KubernetesConfig.FeatureGates, "LocalStorageCapacityIsolation=false")
522+
}
519523
}
520524

521525
return cc
522526
}
523527

524528
func addFeatureGate(featureGates, s string) string {
529+
if len(featureGates) == 0 {
530+
return s
531+
}
525532
split := strings.Split(featureGates, ",")
526533
m := make(map[string]struct{}, len(split))
527534
for _, v := range split {

Diff for: pkg/minikube/reason/known_issues.go

+9
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,15 @@ var guestIssues = []match{
10531053
},
10541054
Regexp: re(`'/var/lib/dpkg': No such file or directory`),
10551055
},
1056+
{
1057+
Kind: Kind{
1058+
ID: "GUEST_STORAGE_DRIVER_BTRFS",
1059+
ExitCode: ExGuestUnsupported,
1060+
Advice: "minikube does not support the BTRFS storage driver yet, there is a workaround, add the following flag to your start command `--feature-gates=\"LocalStorageCapacityIsolation=false\"`",
1061+
Issues: []int{7923},
1062+
},
1063+
Regexp: re(`unsupported graph driver: btrfs`),
1064+
},
10561065
{
10571066
Kind: Kind{
10581067
ID: "GUEST_INCORRECT_ARCH",

0 commit comments

Comments
 (0)