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

service command executes wrong helper #19878

Open
bigon opened this issue Oct 29, 2024 · 8 comments
Open

service command executes wrong helper #19878

bigon opened this issue Oct 29, 2024 · 8 comments

Comments

@bigon
Copy link

bigon commented Oct 29, 2024

What Happened?

As you can see bellow, minikube tries to execute kvm2, but this seems wrong.

The driver is called docker-machine-driver-kvm2 (and not in the PATH)

Running debian unstable

$ minikube service --all
|-----------|------------|-------------|--------------|
| NAMESPACE |    NAME    | TARGET PORT |     URL      |
|-----------|------------|-------------|--------------|
| default   | kubernetes |             | No node port |
|-----------|------------|-------------|--------------|
😿  service default/kubernetes has no node port
❗  Services [default/kubernetes] have type "ClusterIP" not meant to be exposed, however for local development minikube allows you to access this !
E1029 14:47:25.572916   77507 out.go:502] unable to execute error getting ssh port: get port 22 for "minikube": kvm2 container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube: exec: "kvm2": executable file not found in $PATH
stdout:

stderr:
: template: error getting ssh port: get port 22 for "minikube": kvm2 container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube: exec: "kvm2": executable file not found in $PATH
stdout:

stderr:
:1:90: executing "error getting ssh port: get port 22 for \"minikube\": kvm2 container inspect -f \"'{{(index (index .NetworkSettings.Ports \"22/tcp\") 0).HostPort}}'\" minikube: exec: \"kvm2\": executable file not found in $PATH\nstdout:\n\nstderr:\n" at <index .NetworkSettings.Ports "22/tcp">: error calling index: index of untyped nil - returning raw string.

❌  Exiting due to DRV_PORT_FORWARD: error getting ssh port: get port 22 for "minikube": kvm2 container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube: exec: "kvm2": executable file not found in $PATH
stdout:

stderr:


╭───────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                           │
│    😿  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:                             │
│    - /tmp/minikube_service_7307d14e4bcde4344d1f5773b0e0f52f3b39b30f_0.log                 │
│                                                                                           │
╰───────────────────────────────────────────────────────────────────────────────────────────╯

Attach the log file

minikube_service_7307d14e4bcde4344d1f5773b0e0f52f3b39b30f_0.log

Operating System

Other

Driver

KVM2

@bigon
Copy link
Author

bigon commented Oct 29, 2024

logs.txt

@bigon
Copy link
Author

bigon commented Oct 29, 2024

BTW I find an other similar bugs #18825

@medyagh
Copy link
Member

medyagh commented Oct 30, 2024

@prezha do you mind taking a look?

@medyagh
Copy link
Member

medyagh commented Oct 30, 2024

@bigon do you have multiple profiles ? do you mind sharing
"minikube profile list"

@bigon
Copy link
Author

bigon commented Oct 30, 2024

Hello,

No only one profile

$ minikube profile list
|----------|-----------|---------|----------------|------|---------|---------|-------|----------------|--------------------|
| Profile  | VM Driver | Runtime |       IP       | Port | Version | Status  | Nodes | Active Profile | Active Kubecontext |
|----------|-----------|---------|----------------|------|---------|---------|-------|----------------|--------------------|
| minikube | kvm2      | docker  | 192.168.39.211 | 8443 | v1.31.0 | Running |     1 | *              | *                  |
|----------|-----------|---------|----------------|------|---------|---------|-------|----------------|--------------------|

@prezha
Copy link
Contributor

prezha commented Oct 30, 2024

looks like the problem is that we're always calling the kic-based logic (specifically, the startKicServiceTunnel() func) without checking first if a kic driver is used for given profile, and in this and the other #18825 case, users are using vm/kvm driver, so it fails

the code segment that's making a call without checking (introduced in pr #17877 on 3rd of april this year):
https://github.com/kubernetes/minikube/pull/17877/files#diff-72b0db9f1698ff6131feb23cdcc885688b228eddf388bf36db516dd6e0ede9a8R172-R174

@Ritikaa96
Copy link

Hi @bigon given the above statement this issue should be resolved. can you confirm?

@bigon
Copy link
Author

bigon commented Dec 11, 2024

Hello,

Well according to my understanding, the problem is not fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants