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

matching node name by hostname *prefix* can lead to too many instances returned for node name #388

Open
jlamillan opened this issue May 25, 2022 · 0 comments

Comments

@jlamillan
Copy link

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

CCM Version: all

What happened?

When nodes come from an OCI instance pools, many of them will have the same hostname prefix causing errors in GetInstanceByNodeName:

Example scenario:

VNIC hostname label: ashburn-ops-node-ad1-vnic

Two example nodes:
node 1: ashburn-ops-node-ad1-vnic-850450
node 2: ashburn-ops-node-ad1-vnic-283027

i.e. strings.HasPrefix(nodeName, *vnic.HostnameLabel) is true for both these nodes leading to:

ERROR cloud/node_controller.go:140 GetInstanceByNodeName: too many instances returned for node name "ashburn-ops-node-ad1-vnic-850450": 2

What you expected to happen?

Only one node to be matched.

How to reproduce it (as minimally and precisely as possible)?

Have multiple nodes with the same prefix.

Anything else we need to know?

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