Skip to content

[NanoCtrl, PeerAgent] fix scope name logic#90

Merged
JimyMa merged 2 commits into
mainfrom
scope_fix
May 9, 2026
Merged

[NanoCtrl, PeerAgent] fix scope name logic#90
JimyMa merged 2 commits into
mainfrom
scope_fix

Conversation

@JimyMa
Copy link
Copy Markdown
Contributor

@JimyMa JimyMa commented May 9, 2026

Summary

Fix PeerAgent alias registration and scope discovery behavior in the NanoCtrl control plane.

Motivation

PeerAgent aliases are scoped identifiers. Agents in different scopes should be allowed to use the same alias, but two agents in the same scope should not silently overwrite each other in Redis.

Previously, duplicate aliases could overwrite the same agent:{alias} key, making two PeerAgents appear as one agent and causing confusing connection/read behavior.

Changes

  • Add NanoCtrl/lua/register_agent.lua for atomic PeerAgent registration.
  • Reject duplicate PeerAgent aliases within the same scope.
  • Preserve support for the same alias across different scopes.
  • Load the new Lua script through LuaScripts.
  • Add PeerAgent-side self-alias rejection in connect_to().
  • Add tests for:
    • self-alias connection rejection
    • scope-isolated discovery with the same alias in different scopes
  • Update the control-plane RDMA read example to use distinct aliases and a shared scope.

Validation

cargo fmt
cargo check
pytest -q tests/python/test_peer_agent_topology_discovery.py
python -m py_compile dlslime/peer_agent/_agent.py examples/python/p2p_rdma_rc_read_ctrl_plane.py

@JimyMa JimyMa requested a deployment to self-hosted-rdma May 9, 2026 07:39 — with GitHub Actions Waiting
Move peer-agent registration into a dedicated NanoCtrl Lua script so alias
registration is atomic. Duplicate aliases now conflict only within the same
scope, while identical aliases in different scopes remain isolated.

Also add PeerAgent-side self-alias rejection and tests for scope-isolated
discovery with matching aliases across scopes.
@JimyMa JimyMa had a problem deploying to self-hosted-rdma May 9, 2026 07:57 — with GitHub Actions Failure
@JimyMa JimyMa temporarily deployed to self-hosted-rdma May 9, 2026 08:03 — with GitHub Actions Inactive
@JimyMa JimyMa merged commit 40866cd into main May 9, 2026
6 of 7 checks passed
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.

1 participant