Skip to content

Commit

Permalink
Merge pull request #12990 from spowelljr/btrfsErrorMessage
Browse files Browse the repository at this point in the history
Add advice if user using btrfs storage driver
  • Loading branch information
medyagh authored Dec 4, 2021
2 parents cb8c008 + c8fbd6e commit f1d63df
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/minikube/cmd/start_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,12 +516,19 @@ func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, drvName s
// See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-in-userns/
cc.KubernetesConfig.FeatureGates = addFeatureGate(cc.KubernetesConfig.FeatureGates, "KubeletInUserNamespace=true")
}
if si.StorageDriver == "btrfs" {
klog.Info("auto-setting LocalStorageCapacityIsolation to false because using btrfs storage driver")
cc.KubernetesConfig.FeatureGates = addFeatureGate(cc.KubernetesConfig.FeatureGates, "LocalStorageCapacityIsolation=false")
}
}

return cc
}

func addFeatureGate(featureGates, s string) string {
if len(featureGates) == 0 {
return s
}
split := strings.Split(featureGates, ",")
m := make(map[string]struct{}, len(split))
for _, v := range split {
Expand Down
9 changes: 9 additions & 0 deletions pkg/minikube/reason/known_issues.go
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,15 @@ var guestIssues = []match{
},
Regexp: re(`'/var/lib/dpkg': No such file or directory`),
},
{
Kind: Kind{
ID: "GUEST_STORAGE_DRIVER_BTRFS",
ExitCode: ExGuestUnsupported,
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\"`",
Issues: []int{7923},
},
Regexp: re(`unsupported graph driver: btrfs`),
},
{
Kind: Kind{
ID: "GUEST_INCORRECT_ARCH",
Expand Down

0 comments on commit f1d63df

Please sign in to comment.