Skip to content

Inconsistent state between telnet and HTTP API (MHEARD and LINKS) until restart #9

Description

@IanHenry

Description

There appears to be a state consistency issue between LinBPQ’s telnet interface and the HTTP API.

After normal operation, the telnet interface continues to show correct live state for MHEARD and links, while the HTTP API (/api/mheard, /api/links) becomes inconsistent or stale following session disconnect events. A restart of LinBPQ restores consistency.

This suggests a divergence between internal live state tables and the structures used by the HTTP API layer.


Steps to reproduce

  1. Start LinBPQ with RF port(s) active
  2. A remote station initiates an inbound RF connection
    (station connects to the node; node does not initiate the link)
  3. Verify state in both interfaces:
    • Telnet MHEARD shows station correctly
    • /api/mheard shows station correctly
    • /api/links reflects correct link state (if active links exist)
  4. Remote station disconnects normally
  5. Observe:
    • Telnet MHEARD still shows correct expected state
    • /api/mheard no longer matches telnet output (entry missing or stale)
    • /api/links may also show stale or missing link state
  6. Restart LinBPQ
  7. Both MHEARD and LINKS become consistent again across telnet and API

Expected behaviour

Telnet and HTTP API should reflect the same underlying live state for:

  • MHEARD entries
  • active links

without requiring a restart to resynchronise.


Actual behaviour

  • Telnet displays correct live MHEARD and link state
  • HTTP API (/api/mheard, /api/links) becomes inconsistent after disconnect events
  • State corrects only after restarting LinBPQ

Notes / observations

  • MHEARD persistence exists via MHSave.txt
  • API MHEARD implemented via sendPortMHList()BuildPortMH()
  • LINKS API implemented via sendLinks()
  • Issue appears after remote inbound session disconnect events
  • Suggests divergence between live internal state and API snapshot/rebuild paths

Impact

  • External dashboards using HTTP API may show incorrect topology or node visibility
  • Telnet interface and API do not agree on system state
  • Requires restart to resynchronise views

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions