Merge pull request #11357 from afbjorklund/driver-suggestion
Show suggestion for rejected unhealthy driverspull/11396/head
commit
126d452d9e
|
@ -591,6 +591,9 @@ func selectDriver(existing *config.ClusterConfig) (registry.DriverState, []regis
|
|||
out.Step(style.ThumbsDown, "Unable to pick a default driver. Here is what was considered, in preference order:")
|
||||
for _, r := range rejects {
|
||||
out.Infof("{{ .name }}: {{ .rejection }}", out.V{"name": r.Name, "rejection": r.Rejection})
|
||||
if r.Suggestion != "" {
|
||||
out.Infof("{{ .name }}: Suggestion: {{ .suggestion}}", out.V{"name": r.Name, "suggestion": r.Suggestion})
|
||||
}
|
||||
}
|
||||
exit.Message(reason.DrvNotDetected, "No possible driver was detected. Try specifying --driver, or see https://minikube.sigs.k8s.io/docs/start/")
|
||||
}
|
||||
|
|
|
@ -289,6 +289,7 @@ func Suggest(options []registry.DriverState) (registry.DriverState, []registry.D
|
|||
|
||||
if !ds.State.Healthy {
|
||||
ds.Rejection = fmt.Sprintf("Not healthy: %v", ds.State.Error)
|
||||
ds.Suggestion = fmt.Sprintf("%s <%s>", ds.State.Fix, ds.State.Doc)
|
||||
rejects = append(rejects, ds)
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -72,6 +72,8 @@ type DriverState struct {
|
|||
State State
|
||||
// Rejection is why we chose not to use this driver
|
||||
Rejection string
|
||||
// Suggestion is how the user could improve health
|
||||
Suggestion string
|
||||
}
|
||||
|
||||
func (d DriverState) String() string {
|
||||
|
|
|
@ -903,6 +903,7 @@
|
|||
"version yaml failure": "",
|
||||
"zsh completion failed": "",
|
||||
"zsh completion.": "",
|
||||
"{{ .name }}: Suggestion: {{ .suggestion}}": "",
|
||||
"{{ .name }}: {{ .rejection }}": "",
|
||||
"{{.Driver}} is currently using the {{.StorageDriver}} storage driver, consider switching to overlay2 for better performance": "",
|
||||
"{{.count}} nodes stopped.": "",
|
||||
|
|
|
@ -908,6 +908,7 @@
|
|||
"version yaml failure": "",
|
||||
"zsh completion failed": "",
|
||||
"zsh completion.": "",
|
||||
"{{ .name }}: Suggestion: {{ .suggestion}}": "",
|
||||
"{{ .name }}: {{ .rejection }}": "",
|
||||
"{{.Driver}} is currently using the {{.StorageDriver}} storage driver, consider switching to overlay2 for better performance": "",
|
||||
"{{.count}} nodes stopped.": "",
|
||||
|
|
|
@ -910,6 +910,7 @@
|
|||
"version yaml failure": "échec de la version du YAML",
|
||||
"zsh completion failed": "complétion de zsh en échec",
|
||||
"zsh completion.": "",
|
||||
"{{ .name }}: Suggestion: {{ .suggestion}}": "",
|
||||
"{{ .name }}: {{ .rejection }}": "{{ .name }} : {{ .rejection }}",
|
||||
"{{.Driver}} is currently using the {{.StorageDriver}} storage driver, consider switching to overlay2 for better performance": "",
|
||||
"{{.count}} nodes stopped.": "{{.count}} nœud(s) arrêté(s).",
|
||||
|
|
|
@ -920,6 +920,7 @@
|
|||
"version yaml failure": "YAML でバージョンを表示するのに失敗しました",
|
||||
"zsh completion failed": "zsh の補完が失敗しました",
|
||||
"zsh completion.": "",
|
||||
"{{ .name }}: Suggestion: {{ .suggestion}}": "",
|
||||
"{{ .name }}: {{ .rejection }}": "{{ .name }}: {{ .rejection }}",
|
||||
"{{.Driver}} is currently using the {{.StorageDriver}} storage driver, consider switching to overlay2 for better performance": "",
|
||||
"{{.cluster}} IP has been updated to point at {{.ip}}": "{{.cluster}} の IP アドレスは {{.ip}} へと更新されました",
|
||||
|
|
|
@ -920,6 +920,7 @@
|
|||
"version yaml failure": "",
|
||||
"zsh completion failed": "zsh 완성이 실패하였습니다",
|
||||
"zsh completion.": "",
|
||||
"{{ .name }}: Suggestion: {{ .suggestion}}": "",
|
||||
"{{ .name }}: {{ .rejection }}": "",
|
||||
"{{.Driver}} is currently using the {{.StorageDriver}} storage driver, consider switching to overlay2 for better performance": "",
|
||||
"{{.count}} nodes stopped.": "{{.count}}개의 노드가 중지되었습니다.",
|
||||
|
|
|
@ -922,6 +922,7 @@
|
|||
"version yaml failure": "",
|
||||
"zsh completion failed": "",
|
||||
"zsh completion.": "",
|
||||
"{{ .name }}: Suggestion: {{ .suggestion}}": "",
|
||||
"{{ .name }}: {{ .rejection }}": "",
|
||||
"{{.Driver}} is currently using the {{.StorageDriver}} storage driver, consider switching to overlay2 for better performance": "",
|
||||
"{{.addonName}} was successfully enabled": "{{.addonName}} został aktywowany pomyślnie",
|
||||
|
|
|
@ -848,6 +848,7 @@
|
|||
"version yaml failure": "",
|
||||
"zsh completion failed": "",
|
||||
"zsh completion.": "",
|
||||
"{{ .name }}: Suggestion: {{ .suggestion}}": "",
|
||||
"{{ .name }}: {{ .rejection }}": "",
|
||||
"{{.Driver}} is currently using the {{.StorageDriver}} storage driver, consider switching to overlay2 for better performance": "",
|
||||
"{{.count}} nodes stopped.": "",
|
||||
|
|
|
@ -1030,6 +1030,7 @@
|
|||
"version yaml failure": "",
|
||||
"zsh completion failed": "",
|
||||
"zsh completion.": "",
|
||||
"{{ .name }}: Suggestion: {{ .suggestion}}": "",
|
||||
"{{ .name }}: {{ .rejection }}": "",
|
||||
"{{.Driver}} is currently using the {{.StorageDriver}} storage driver, consider switching to overlay2 for better performance": "",
|
||||
"{{.count}} nodes stopped.": "",
|
||||
|
|
Loading…
Reference in New Issue