Skip to content

spored discovers job-array peers once at boot and only logs the count; nothing consumes the result #933

Closed

Description

@scttfrdmn

Found while fixing #918.

newAgent (pkg/agent/agent.go) calls prov.DiscoverPeers once, at startup, for every job-array member, and the only thing it does with the result is log ✓ Discovered N peers. The peers are not stored on the agent, written to a file, exposed by spored status, or refreshed later. grep -rn DiscoverPeers( finds no other production caller (registry.PeerRegistry.DiscoverPeers and registry.DiscoverPeersForJobArray have none either).

Consequences:

  • After Burst (EC2) members of a hybrid job array never read the hybrid registry, so they cannot discover local nodes #918 (PR for fix/918), a burst member's discovery does include the local nodes from the hybrid registry, but a workload on the instance still has no way to read them. spawn burst's help says burst instances "coordinate with local instances"; nothing in spored delivers that list to the workload.
  • Discovery runs at boot, before most siblings have registered or started, so even the logged count is usually a lower bound. Local nodes or burst members that join later are never seen.
  • The /etc/spawn/job-array-peers.json file used to be written by EC2Provider.DiscoverPeers; it moved to the cohort Assembler for MPI (pkg/mpicohort), which only covers spawn launch --mpi, not hybrid/burst arrays.

Suggested: decide what the hybrid-array contract is. Either (a) publish the merged peer list somewhere a workload can read it (a peers file, refreshed on the heartbeat interval, or a spored peers command), or (b) drop the "coordinate with local instances" claim from spawn burst's help and treat discovery as diagnostics only.

Verified by reading the code only. No instances were launched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions