Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh known issues map #9176

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,697 changes: 0 additions & 1,697 deletions go.sum

This file was deleted.

2 changes: 2 additions & 0 deletions pkg/minikube/logs/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ var rootCauses = []string{
`Failed to initialize CSINodeInfo.*forbidden`,
`Failed to admit pod`,
`failed to "StartContainer"`,
`Failed to start ContainerManager`,
`kubelet.*forbidden.*cannot \w+ resource`,
`leases.*forbidden.*cannot \w+ resource`,
`failed to start daemon`,
}

// rootCauseRe combines rootCauses into a single regex
Expand Down
2 changes: 2 additions & 0 deletions pkg/minikube/logs/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ func TestIsProblem(t *testing.T) {
{"regular scheduler services init", false, ` k8s.io/client-go/informers/factory.go:135: Failed to list *v1.Service: services is forbidden: User "system:kube-scheduler" cannot list resource "services" in API group "" at the cluster scope`},
{"regular scheduler nodes init", false, `k8s.io/client-go/informers/factory.go:135: Failed to list *v1.Node: nodes is forbidden: User "system:kube-scheduler" cannot list resource "nodes" in API group "" at the cluster scope`},
{"kubelet rbac fail", true, `k8s.io/kubernetes/pkg/kubelet/kubelet.go:526: Failed to list *v1.Node: nodes "m01" is forbidden: User "system:node:m01" cannot list resource "nodes" in API group "" at the cluster scope`},
{"kubelet pids cgroup", true, `Failed to start ContainerManager failed to initialize top level QOS containers: failed to update top level Burstable QOS cgroup : failed to set supported cgroup subsystems for cgroup [kubepods burstable]: failed to find subsystem mount for required subsystem: pids`},
{"docker cgroups v2 fail", true, `failed to start daemon: Devices cgroup isn't mounted`},
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/node/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ func startHost(api libmachine.API, cc *config.ClusterConfig, n *config.Node, del

// Don't use host.Driver to avoid nil pointer deref
drv := cc.Driver
out.ErrT(style.Sad, `Failed to start {{.driver}} {{.driver_type}}. "{{.cmd}}" may fix it: {{.error}}`, out.V{"driver": drv, "driver_type": driver.MachineType(drv), "cmd": mustload.ExampleCmd(cc.Name, "start"), "error": err})
out.ErrT(style.Sad, `Failed to start {{.driver}} {{.driver_type}}. Running "{{.cmd}}" may fix it: {{.error}}`, out.V{"driver": drv, "driver_type": driver.MachineType(drv), "cmd": mustload.ExampleCmd(cc.Name, "delete"), "error": err})
return host, exists, err
}

Expand Down
101 changes: 100 additions & 1 deletion pkg/minikube/reason/known_issues.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,25 @@ var hostIssues = []match{
},
Regexp: re(`Container.*is not running.*chown docker:docker`),
},
{
Kind: Kind{
ID: "HOST_PIDS_CGROUP",
ExitCode: ExHostUnsupported,
Advice: "Ensure that the required 'pids' cgroup is enabled on your host: grep pids /proc/cgroups",
Issues: []int{6411},
},
Regexp: re(`failed to find subsystem mount for required subsystem: pids`),
GOOS: []string{"linux"},
},
{
Kind: Kind{
ID: "HOST_HOME_PERMISSION",
ExitCode: ExGuestPermission,
Advice: "Your user lacks permissions to the minikube profile directory. Run: 'sudo chown -R $USER $HOME/.minikube; chmod -R u+wrx $HOME/.minikube' to fix",
Issues: []int{9165},
},
Regexp: re(`/.minikube/.*: permission denied`),
},
}

// providerIssues are failures relating to a driver provider
Expand Down Expand Up @@ -237,6 +256,28 @@ var providerIssues = []match{
},
Regexp: re(`executing "" at <index (index .NetworkSettings.Ports "22/tcp") 0>`),
},
{
Kind: Kind{
ID: "PR_DOCKER_MOUNTS_EOF",
ExitCode: ExProviderError,
Advice: "Reset Docker to factory defaults",
Issues: []int{8832},
URL: "https://docs.docker.com/docker-for-mac/#reset",
},
GOOS: []string{"darwin"},
Regexp: re(`docker:.*Mounts denied: EOF`),
},
{
Kind: Kind{
ID: "PR_DOCKER_MOUNTS_EOF",
ExitCode: ExProviderError,
Advice: "Reset Docker to factory defaults",
Issues: []int{8832},
URL: "https://docs.docker.com/docker-for-windows/#reset",
},
GOOS: []string{"windows"},
Regexp: re(`docker:.*Mounts denied: EOF`),
},

// Hyperkit hypervisor
{
Expand Down Expand Up @@ -303,6 +344,28 @@ var providerIssues = []match{
Regexp: re(`The requested operation requires elevation.`),
GOOS: []string{"windows"},
},
{
Kind: Kind{
ID: "PR_POWERSHELL_CONSTRAINED",
ExitCode: ExProviderPermission,
Advice: "PowerShell is running in constrained mode, which is incompatible with Hyper-V scripting.",
Issues: []int{7347},
URL: "https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/",
},
Regexp: re(`MethodInvocationNotSupportedInConstrainedLanguage`),
GOOS: []string{"windows"},
},
{
Kind: Kind{
ID: "PR_HYPERV_MODULE_NOT_INSTALLED",
ExitCode: ExProviderNotFound,
Advice: "Run: 'Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Tools-All'",
Issues: []int{7347},
URL: "https://www.altaro.com/hyper-v/install-hyper-v-powershell-module/",
},
Regexp: re(`Hyper-V PowerShell Module is not available`),
GOOS: []string{"windows"},
},

// KVM hypervisor
{
Expand Down Expand Up @@ -857,6 +920,33 @@ var guestIssues = []match{
Regexp: re(`The process cannot access the file because it is being used by another process`),
GOOS: []string{"windows"},
},
{
Kind: Kind{
ID: "GUEST_NOT_FOUND",
ExitCode: ExGuestNotFound,
Advice: "minikube is missing files relating to your guest environment. This can be fixed by running 'minikube delete'",
Issues: []int{9130},
},
Regexp: re(`config.json: The system cannot find the file specified`),
},
{
Kind: Kind{
ID: "GUEST_SSH_CERT_NOT_FOUND",
ExitCode: ExGuestNotFound,
Advice: "minikube is missing files relating to your guest environment. This can be fixed by running 'minikube delete'",
Issues: []int{9130},
},
Regexp: re(`id_rsa: no such file or directory`),
},
{
Kind: Kind{
ID: "GUEST_CONFIG_CORRUPT",
ExitCode: ExGuestConfig,
Advice: "The existing node configuration appears to be corrupt. Run 'minikube delete'",
Issues: []int{9175},
},
Regexp: re(`configuration.*corrupt`),
},
}

// runtimeIssues are container runtime issues (containerd, docker, etc)
Expand All @@ -865,7 +955,7 @@ var runtimeIssues = []match{
Kind: Kind{
ID: "RT_DOCKER_RESTART",
ExitCode: ExRuntimeError,
Advice: "Remove the incompatible --docker-opt flag if one was provided",
Advice: "Remove the invalid --docker-opt or --inecure-registry flag if one was provided",
Issues: []int{7070},
},
Regexp: re(`systemctl -f restart docker`),
Expand Down Expand Up @@ -962,6 +1052,15 @@ var controlPlaneIssues = []match{
},
Regexp: re(`dnsDomain: Invalid`),
},
{
Kind: Kind{
ID: "K8S_INVALID_CERT_HOSTNAME",
ExitCode: ExControlPlaneConfig,
Advice: "The certificate hostname provided appears to be invalid (may be a minikube bug)",
NewIssueLink: true,
},
Regexp: re(`apiServer.certSANs: Invalid value`),
},
}

// serviceIssues are issues with services running on top of Kubernetes
Expand Down
3 changes: 3 additions & 0 deletions pkg/minikube/reason/match_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap,
{6109, "", "INET_DOWNLOAD_BLOCKED", `Failed to update cluster: downloading binaries: downloading kubelet: Error downloading kubelet v1.16.2: failed to download: failed to download to temp file: failed to copy contents: read tcp 192.168.0.106:61314->172.217.166.176:443: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.`},
{6109, "", "INET_DOWNLOAD_BLOCKED", `Failed to update cluster: downloading binaries: downloading kubeadm: Error downloading kubeadm v1.17.0: failed to download: failed to download to temp file: failed to copy contents: read tcp [2606:a000:81c5:1e00:349a:26c0:7ea6:bbf1]:55317->[2607:f8b0:4004:815::2010]:443: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.`},
{4277, "linux", "PR_KVM_MSR", `Unable to start VM: start: Error creating VM: virError(Code=1, Domain=10, Message='internal error: qemu unexpectedly closed the monitor: 2019-05-17T02:20:07.980140Z qemu-system-x86_64: error: failed to set MSR 0x38d to 0x0 qemu-system-x86_64: /build/qemu-lXHhGe/qemu-2.11+dfsg/target/i386/kvm.c:1807: kvm_put_msrs: Assertion ret == cpu->kvm_msr_buf->nmsrs failed.`},
{8832, "macos", "PR_DOCKER_MOUNTS_EOF", `docker: Error response from daemon: Mounts denied: EOF.`},
{9165, "", "HOST_HOME_PERMISSION", `open /Users/conradwt/.minikube/profiles/gcloud-local-dev/config.json: permission denied`},
{9175, "", "GUEST_CONFIG_CORRUPT", " updating control plane: generating kubeadm cfg: generating extra component config for kubeadm: controlPlane configuration is corrupt: no name: {Name: IP: Port:8443 KubernetesVersion:v1.19.0 ControlPlane:true Worker:true}"},
}
for _, tc := range tests {
t.Run(tc.want, func(t *testing.T) {
Expand Down