Skip to content

doublezero-admin migration command #3349

@ben-malbeclabs

Description

@ben-malbeclabs

One-time migration command covering two tasks:

  1. Links — iterate all existing Link accounts with link_topologies = [] and set link_topologies[0] to the UNICAST-DEFAULT TopologyInfo pubkey.
  2. Vpnv4 loopbacks — iterate all existing Interface accounts with loopback_type = Vpnv4 and allocate a FlexAlgoNodeSegment entry (topology pubkey + allocated node segment index from SegmentRoutingIds ResourceExtension) for each known TopologyInfo account. Existing node_segment_idx assignments (algo-0) are unchanged.

The command MUST be idempotent — re-running skips already-migrated accounts. Must emit a summary on completion (e.g. migrated 12 links, 4 loopbacks; skipped 3 already migrated). A --dry-run flag MUST be supported.

Milestone: RFC-18: CLI
RFC: #3288


Files affected:

  • controlplane/doublezero-admin/src/cli/ (new migration subcommand)

Size: Medium

Tests:

  • Migration skips already-migrated links and loopbacks
  • Allocates correctly for unset links and loopbacks
  • Dry-run output matches expected changes without applying
  • Idempotent on re-run
  • Summary output correct

Blockers: #3344 (TopologyInfo account)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions