Skip to content

cli: the init process does not propagate through one-way --join connectivity #61621

@knz

Description

@knz

NB: This is not a new issue (it existed in 20.1) however it just caused me to spend a lot of time staring at my screen not understanding what was going on.

What I did:

  1. on node n1, cockroach start without --join (or a self-join)
  2. on node n2, cockroach start --join=n1

At this point I verified in logs that n2 was establishing a conn to n1, and n1 was receiving an init request / join request from n2.

  1. then I ran cockroach init --host=n2

That caused n2 to initialize a cluster centered on n2 (with node ID 1). However n1 does not participate and does not join, and remains uninitialized (no node ID).

This surprised me -- I thought that the join flag need not create a full connectivity graph for the init command to propagate throughout the established connections.

Was that the intended behavior?

cc @tbg @bdarnell @irfansharif

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cli-adminCLI commands that pertain to controlling and configuring nodesA-kv-gossipA-kv-serverRelating to the KV-level RPC serverC-questionA question rather than an issue. No code/spec/doc change needed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions