Skip to content

Commit

Permalink
Merge pull request #5384 from tstromberg/new-solutions
Browse files Browse the repository at this point in the history
Update solutions, add HideCreateLink option
  • Loading branch information
tstromberg authored Sep 18, 2019
2 parents 5aa839d + 485c269 commit 83c8f25
Show file tree
Hide file tree
Showing 6 changed files with 278 additions and 149 deletions.
8 changes: 5 additions & 3 deletions pkg/minikube/exit/exit.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ func WithProblem(msg string, p *problem.Problem) {
out.ErrT(out.Empty, "")
out.FatalT(msg)
p.Display()
out.ErrT(out.Empty, "")
out.ErrT(out.Sad, "If the above advice does not help, please let us know: ")
out.ErrT(out.URL, "https://github.com/kubernetes/minikube/issues/new/choose")
if !p.HideCreateLink {
out.ErrT(out.Empty, "")
out.ErrT(out.Sad, "If the above advice does not help, please let us know: ")
out.ErrT(out.URL, "https://github.com/kubernetes/minikube/issues/new/choose")
}
os.Exit(Config)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/logs/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
)

// rootCauseRe is a regular expression that matches known failure root causes
var rootCauseRe = regexp.MustCompile(`^error: |eviction manager: pods.* evicted|unknown flag: --|forbidden.*no providers available|eviction manager:.*evicted|tls: bad certificate|kubelet.*no API client|kubelet.*No api server|STDIN.*127.0.0.1:8080|failed to create listener|address already in use`)
var rootCauseRe = regexp.MustCompile(`^error: |eviction manager: pods.* evicted|unknown flag: --|forbidden.*no providers available|eviction manager:.*evicted|tls: bad certificate|kubelet.*no API client|kubelet.*No api server|STDIN.*127.0.0.1:8080|failed to create listener|address already in use|unable to evict any pods|eviction manager: unexpected error`)

// ignoreCauseRe is a regular expression that matches spurious errors to not surface
var ignoreCauseRe = regexp.MustCompile("error: no objects passed to apply")
Expand Down
1 change: 1 addition & 0 deletions pkg/minikube/logs/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TestIsProblem(t *testing.T) {
{"no-providers-available #3818", true, ` kubelet.go:1662] Failed creating a mirror pod for "kube-apiserver-minikube_kube-system(c7d572aebd3d33b17fa78ae6395b6d0a)": pods "kube-apiserver-minikube" is forbidden: no providers available to validate pod request`},
{"no-objects-passed-to-apply #4010", false, "error: no objects passed to apply"},
{"bad-certificate #4251", true, "log.go:172] http: TLS handshake error from 127.0.0.1:49200: remote error: tls: bad certificate"},
{"ephemeral-eviction #5355", true, " eviction_manager.go:419] eviction manager: unexpected error when attempting to reduce ephemeral-storage pressure: wanted to free 9223372036854775807 bytes, but freed 0 bytes space with errors in image deletion"},
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
Expand Down
Loading

0 comments on commit 83c8f25

Please sign in to comment.