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

Fix enabling & disabling addons with non-existing cluster #17324

Merged
merged 3 commits into from
Oct 4, 2023

Conversation

spowelljr
Copy link
Member

Fixes #17317

Enabling Addon

Before:

$ minikube addons enable dashboard
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x228 pc=0x102386bb8]

goroutine 1 [running]:
k8s.io/minikube/cmd/minikube/cmd/config.glob..func11(0x14000168f00?, {0x14000110eb0, 0x1, 0x102425f1c?})
        /Users/powellsteven/repo/minikube/cmd/minikube/cmd/config/enable.go:47 +0x198
github.com/spf13/cobra.(*Command).execute(0x1044f9920, {0x14000110e50, 0x1, 0x1})
        /Users/powellsteven/go/pkg/mod/github.com/spf13/[email protected]/command.go:944 +0x640
github.com/spf13/cobra.(*Command).ExecuteC(0x1044f4b80)
        /Users/powellsteven/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x320
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/powellsteven/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
k8s.io/minikube/cmd/minikube/cmd.Execute()
        /Users/powellsteven/repo/minikube/cmd/minikube/cmd/root.go:174 +0x54c
main.main()
        /Users/powellsteven/repo/minikube/cmd/minikube/main.go:95 +0x258

After:

$ minikube addons enable dashboard
🤷  Profile "minikube" not found. Run "minikube profile list" to view all profiles.
👉  To start a cluster, run: "minikube start"

Disabling Addon

Before:

$ minikube addons disable dashboard

❌  Exiting due to MK_ADDON_DISABLE_PAUSED: disable failed: loading profile: cluster "minikube" does not exist

╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                         │
│    😿  If the above advice does not help, please let us know:                                                           │
│    👉  https://github.com/kubernetes/minikube/issues/new/choose                                                         │
│                                                                                                                         │
│    Please run `minikube logs --file=logs.txt` and attach logs.txt to the GitHub issue.                                  │
│    Please also attach the following file to the GitHub issue:                                                           │
│    - /var/folders/9l/6wpxv6wd1b901m1146r579wc00rqw3/T/minikube_addons_42a1f787df8d0157be2dce836a5f91db2b8ab26d_0.log    │
│                                                                                                                         │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

After:

$ minikube addons disable dashboard
🤷  Profile "minikube" not found. Run "minikube profile list" to view all profiles.
👉  To start a cluster, run: "minikube start"

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 29, 2023
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 29, 2023
@medyagh
Copy link
Member

medyagh commented Oct 2, 2023

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 2, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, spowelljr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime
error collecting results for kvm2 driver: timing run 0 with minikube: timing cmd: [out/minikube start --driver=kvm2 --container-runtime=docker]: waiting for minikube: exit status 90
docker driver with docker runtime
error downloading artifacts: artifact download start: exit status 81docker driver with containerd runtime
error downloading artifacts: artifact download start: exit status 81

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Hyperkit_macOS TestNetworkPlugins/group/custom-flannel/Start (gopogh) 4.39 (chart)

To see the flake rates of all tests by environment, click here.

@medyagh medyagh merged commit 6dd875c into kubernetes:master Oct 4, 2023
22 of 37 checks passed
@spowelljr spowelljr deleted the fixEnablingAddon branch October 5, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nil pointer error when enabling addon on non-existing cluster
4 participants