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 3 times, most recently 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
@rustybee42 rustybee42 force-pushed the rb/registration-prevent-id-reuse branch from 3c90917 to 1ebfc99 Compare November 19, 2025 07:09
@rustybee42 rustybee42 force-pushed the rb/registration-prevent-id-reuse branch from 1ebfc99 to 35cac3a Compare December 4, 2025 11:05
Copy link
Member

@philippfalk philippfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good after some discussion and fixing of some corner cases.

Basic tests work as expected:

  1. Upgrade to new database version adds empty column
  2. Starting legacy meta services doesn't add registration tokens
  3. First start of a patched meta adds registration tokens
  4. Storage target registrations add tokens without updates needed to storage service

@rustybee42 rustybee42 force-pushed the rb/registration-prevent-id-reuse branch from 4562878 to 4ed2e6d Compare January 14, 2026 15:14
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 4ed2e6d to 66e4acc Compare January 14, 2026 15:19
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

3 participants