Skip to content

docs: differing Robot server name and Node name not supported#1170

Open
lukasmetzner wants to merge 3 commits intomainfrom
fix-robot-node-name-diff
Open

docs: differing Robot server name and Node name not supported#1170
lukasmetzner wants to merge 3 commits intomainfrom
fix-robot-node-name-diff

Conversation

@lukasmetzner
Copy link
Contributor

@lukasmetzner lukasmetzner commented Mar 2, 2026

In the docs we state:

If you absolutely need to use different names in Robot & Hostname, you can also configure the Provider ID yourself. This can be done on the kubelet through the flag --provider-id. You need to follow the format hrobot://$SERVER_NUMBER when setting this. If this format is not followed exactly we can not process this node.

In the code, we emit a warning event if the Robot API name differs from the Node name, but additionally we return nil for the server object.

@lukasmetzner lukasmetzner requested a review from a team as a code owner March 2, 2026 13:35
@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.93%. Comparing base (ac208a5) to head (d8914b3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1170      +/-   ##
==========================================
+ Coverage   68.02%   68.93%   +0.90%     
==========================================
  Files          24       24              
  Lines        2643     2643              
==========================================
+ Hits         1798     1822      +24     
+ Misses        670      647      -23     
+ Partials      175      174       -1     
Flag Coverage Δ
e2e 43.88% <ø> (+12.32%) ⬆️
unit 65.34% <ø> (+0.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jooola
Copy link
Member

jooola commented Mar 2, 2026

Could we have a unit test for this please?

@apricote
Copy link
Member

apricote commented Mar 2, 2026

I am trying to remember the precise reason for this check and the "nil" return.

IIRC, this is coming from cluster-api-provider-hetzner:

  • Internally CAPH references Robot servers through their ID
  • In CAPH, a Robot server can be dynamically assigned to various Kubernetes clusters, for this they are not deleted in the Robot API, so the ID stays the same, but CAPH changes the name of the server in Robot to the current CAPH node name.
  • In HCCM we usually use the Provider ID to figure out if we need to delete the node. But as the ID stays the same, even though the node is no longer a member of the cluster, this fails for CAPH.
  • So in the original fork by Syself (that I merged in feat: support for Robot servers #561) there was a check that denies returning the node of the name does not match, causing the Kubernetes Node to be correctly deleted.

I am not sure why the docs from the same PR contradict this.

I think we need to support both behaviours, as CAPH relies on this. @janiskemper @guettli is that still the case or am I misremembering the origin of this check?

@apricote
Copy link
Member

apricote commented Mar 2, 2026

PR that introduced this check confirms my understanding: syself#32

@janiskemper
Copy link
Contributor

@apricote I read your comment and together with the PR that you linked I'm sure you are right. I don't know what that means for this PR!

@lukasmetzner
Copy link
Contributor Author

@apricote Then lets adjust the docs, as this is not supported? I will extend the comment in the code and update the unit test.

@lukasmetzner lukasmetzner changed the title fix: allow Robot API and Node name diff docs: remove unsupported feature from docs Mar 2, 2026
@lukasmetzner lukasmetzner force-pushed the fix-robot-node-name-diff branch from eaad982 to d8914b3 Compare March 2, 2026 16:05
@lukasmetzner lukasmetzner changed the title docs: remove unsupported feature from docs docs: differing Robot server name and Node name not supported Mar 2, 2026
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

Successfully merging this pull request may close these issues.

4 participants