Skip to content

Ignored other valid addresses when machine pool connection failure happens #1538

Description

@byteocean

Describe the bug
A machine pool node could have multiple valid addresses that can be used when creating a connection for running exec. However, if the first address matching with one of the preferred address types is not valid or leading to a connection error, the rest valid addresses are not considered anymore. It could leads to the permanent exec client error. The relevant code snippts can be found at 1, 2.

For example, if one of machinepool node has the following addresses:

[{"address":"2a10:abcd:e018:1234::3","type":"InternalIP"},{"address":"libvirt-provider-controller-manager-d9mst","type":"InternalDNS"}]

and preferredAddressTypes has the following values as per default:

MachinePoolHostName, MachinePoolInternalDNS, MachinePoolExternalDNS, MachinePoolExternalDNS, MachinePoolExternalIP

then, only the address for the internal dns will be considered as the connection address even when this one leads to connection error.

To Reproduce

kubectl-ironcore exec  shoot--first--test1-worker-a-z1-58fb6-d4l52 -n ora-dev

If you don't see a command prompt, try pressing enter.
Error: error dialing backend: dial tcp: lookup libvirt-provider-controller-manager-d9mst on 100.104.0.10:53: no such host
2026-08-17T10:54:20.673+0200    ERROR   kubectl-ironcore/main.go:29     Error running command   {"error": "error dialing backend: dial tcp: lookup libvirt-provider-controller-manager-d9mst on 100.104.0.10:53: no such host"}
main.main
        /Users/xyz/git/kubectl-ironcore/main.go:29
runtime.main
        /opt/homebrew/Cellar/go/1.26.1/libexec/src/runtime/proc.go:290

Expected behavior
It also tries connection with InternalIP.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/iaasIssues related to IronCore IaaS development.bugSomething isn't working

    Type

    No type

    Projects

    • Status
      No status
    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions