Skip to content

Hub and node agent on one machine report over each other: the node's API and its leases flicker #170

Closed

Description

@7schmiede

What happens

On a machine where the hub runs and devstack node agent runs for the same pool, both report to the coordinator every 15 s as the same member. They use the same membership in the per-user state: pool_dir(token_path().parent(), pool) in crates/devstack-hub/src/share.rs and member_dir() in crates/devstack/src/poolcmd.rs. The coordinator keeps only the last report (reports.insert(m.id, r) in crates/devstack-node/src/coordinator.rs, report).

The hub's report carries api: None and leases: []. After each hub report:

  • The API is gone: placement treats the machine as "runs no node agent" until the agent reports again.
  • Its leases are dropped: the coordinator takes "not in the report" as "no longer held" (leases.retain(...), None => l.state == "offered" && ...). The agent's next report adds them back through the "coordinator restarted" path with:
    • a new created,
    • a new token,
    • shared: None: a lane's sharing (ADR-0035) is lost.

Found by reading the code (2026-10-21), not reproduced yet. It does not show today because agents run on servers without a hub. It shows as soon as a developer machine runs both.

Fix

One reporter per machine and pool:

Done when

  • A test with a coordinator, a hub and an agent of the same member: across several report rounds the node's api stays, and a running lease keeps its created and its sharing.

Activity

  1. added
    bug
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions