Skip to content

debug: make DERP send frame (framePeerGone) as limited reply as "nobody's here" #4326

Closed

Description

@bradfitz

Imagine node A is trying to reach node B.

Node A thinks that Node B was last homed at DERP region, say, 5.

But let's say that either Node B disappeared or the control server's broken or Node A's client is broken or... whatever. Assume that Node A can connect to DERP-5 and send frame type frameSendPacket to send to B, but then...

nothing

Currently we just do nothing (besides increment some varz in (*Server).recordDrop), and Node A is none the wiser that Node B isn't in that region.

It'd be nice to send a message (rate-limited) telling Node A that Node B's not there so Node A can locally log "oh, well that's messed up.", which would be useful during debugging connectivity problems.

But we already have framePeerGone used for DRPO (#150) that's very close to what we want. We could probably just reuse it, perhaps with a reason byte (reasons being: because they disconnected (the current use, when not listed), or because you tried to send to them, thinking they were here).

/cc @DentonGentry @crawshaw @danderson @maisem

Activity

  1. danderson commented on Mar 30, 2022

    @danderson
    Member

    Only question I have is what happens during startup race conditions.

    • Client B starts up, locates home derp, reports derp5 as home to control
    • Client A gets told B is at derp5
    • A connects to derp5, sends frame, receives peerGone
    • B connects to derp5
    • ???

    If the client doesn't alter its behavior upon receiving peerGone, I guess it's fine and becomes just a debugging aid. Is there anything actionable and inexpensive we'd want to do upon receiving a peerGone?

  2. bradfitz commented on Mar 30, 2022

    @bradfitz
    MemberAuthor

    Your race is #212 which I'm still unhappy about :)

    But yeah, I was thinking this would be purely for debugging and it wouldn't alter the behavior. Except it'd still clear the DRPO route mapping if set, but that's why the frame exists.

  3. added 13 commits that reference this issue on Mar 13, 2023
    1d1c77a
    ce92b48
    c96c770
    1082f4f
    f135c01
    7021a77
    b833af9
    ab6b99a
    05fa07e
    1443559
    9102aae
    46922c6
    8da10be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions