Skip to content

Conversation

@rustybee42
Copy link
Collaborator

@rustybee42 rustybee42 commented Oct 27, 2025

On storage target registration, the node sends a "node string id" / alias which is generated locally on the node. This commit uses that as a registration token to "ensure" that a once registered target id is not reused with a different target - if the registration token is already known, the RegisterNodeMsg will fail. This restores old managements behavior.

Note that the RegisterNodeMsg actually doesn't do anything on an already known target (and didn't before this commit) besides logging. It is up to the server nodes to abort on a failing RegisterNodeMsg.

Closes #22

Related to https://github.com/ThinkParQ/beegfs-core/pull/4486

@rustybee42 rustybee42 self-assigned this Oct 27, 2025
@rustybee42 rustybee42 force-pushed the rb/registration-prevent-id-reuse branch 2 times, most recently from eefea74 to ae4c5cf Compare November 7, 2025 09:04
On storage target registration, the node sends a "node string id" /
alias which is generated locally on the node. This commit uses that as a
registration token to "ensure" that a once registered target id is not
reused with a different target - if the registration token is already
known, the RegisterNodeMsg will fail. This restores old managements
behavior.

Note that the RegisterNodeMsg actually doesn't do anything
on an already known target (and didn't before this commit) besides
logging. It is up to the server nodes to abort on a failing
RegisterNodeMsg.
This takes the previously ignored node_alias field on received
heartbeats from meta nodes (only!) and stores it together with the meta
target as a registration token. When the field is already filled, a
mismatch will fail the heartbeat.
@rustybee42 rustybee42 force-pushed the rb/registration-prevent-id-reuse branch from ae4c5cf to 3c90917 Compare November 7, 2025 09:09
@rustybee42 rustybee42 marked this pull request as ready for review November 7, 2025 09:16
@rustybee42 rustybee42 requested a review from a team as a code owner November 7, 2025 09:16
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.

Add a check to detect and prevent duplicate node and target registrations

2 participants