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

Wrong error message on minikube tunnel without Administrator privilege on Windows #9589

Open
blueelvis opened this issue Oct 30, 2020 · 7 comments
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-solution-message Issues where where offering a solution for an error would be helpful priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@blueelvis
Copy link
Contributor

Steps to reproduce the issue:

  1. minikube start --driver hyperv
  2. Open a Command Prompt/PowerShell session without the Administrator privileges.
  3. minikube tunnel

Full output of failed command:

PS D:\dev\minikube> minikube tunnel --alsologtostderr
W1031 01:48:47.640326   45344 root.go:252] Error reading config file at C:\Users\Pranav.Jituri\.minikube\config\config.json: open C:\Users\Pranav.Jituri\.minikube\config\config.json: The system cannot find the file specified.
I1031 01:48:47.650327   45344 mustload.go:66] Loading cluster: minikube
I1031 01:48:47.654882   45344 main.go:115] libmachine: [executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state
I1031 01:48:48.560370   45344 main.go:115] libmachine: [stdout =====>] :
E1031 01:48:48.560370   45344 main.go:111] libmachine: [stderr =====>] : Hyper-V\Get-VM : You do not have the required permission to complete this task. Contact the administrator of the authorization policy for the computer 'DESKTOP'.
At line:1 char:3
+ ( Hyper-V\Get-VM minikube ).state
+   ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-VM], VirtualizationException
    + FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.GetVM


I1031 01:48:48.571373   45344 out.go:109] * The control plane node "" does not exist.
* The control plane node "" does not exist.
I1031 01:48:48.583371   45344 out.go:109]   - To fix this, run: "minikube start"
  - To fix this, run: "minikube start"

Instead of saying that the control plane doesn't exist, this should be throwing the following kind of error -

{
		Kind: Kind{
			ID:       "PR_HYPERV_AS_ADMIN",
			ExitCode: ExProviderPermission,
			Advice:   "Right-click the PowerShell icon and select Run as Administrator to open PowerShell in elevated mode.",
			URL:      "https://rominirani.com/docker-machine-windows-10-hyper-v-troubleshooting-tips-367c1ea73c24",
			Issues:   []int{4511},
		},
		Regexp: re(`Hyper-v commands have to be run as an Administrator`),
		GOOS:   []string{"windows"},
	},
@blueelvis blueelvis changed the title Wrong error message on minikube tunnel without Administrator privilege Wrong error message on minikube tunnel without Administrator privilege on Windows Oct 30, 2020
@priyawadhwa priyawadhwa added the kind/support Categorizes issue or PR as a support question. label Nov 5, 2020
@priyawadhwa
Copy link

Hey @blueelvis thanks for opening this issue, the error message could definitely be more helpful. If you, or anyone else, would be interested in fixing this I'd be happy to look at the PR

@priyawadhwa priyawadhwa added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. needs-solution-message Issues where where offering a solution for an error would be helpful labels Nov 5, 2020
@CKchen0726
Copy link

@blueelvis Hi, maybe we can add an advisement, such as log info in the following pic:
image

@CKchen0726
Copy link

/assign

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 6, 2021
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 6, 2021
@sharifelgamal sharifelgamal added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels May 12, 2021
@sharifelgamal
Copy link
Collaborator

I believe this is still an issue. Help wanted!

@sandeeppainuly
Copy link

/assign

@spowelljr spowelljr added priority/backlog Higher priority than priority/awaiting-more-evidence. and removed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-solution-message Issues where where offering a solution for an error would be helpful priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
9 participants