Skip to content

Migration: migration without a restart is not supported #3406

@barakeinav1

Description

@barakeinav1

Background

The migration web server's import_keyshares channel receiver is owned exclusively by the onboard() loop (crates/node/src/migration_service/onboarding.rs:36). When that loop exits with OnboardingJob::Done (line 55) — which happens immediately at startup for any node that is already an active participant — the receiver is dropped while the web server task keeps running with a dangling sender.

After that point, any PUT /set_keyshares to the node returns 500 keyshares receiver channel is closed (crates/node/src/migration_service/web/server.rs:185-191). The node must be restarted to re-enter the onboarding loop and recreate the channel.

This surfaced when drafting a back-migration test that does not kill+restart A0 between forward and back directions (PR #3388): A0 cannot accept the back-migration PUT until its process restarts, because A0 was already an active participant at startup and onboard() returned before any migration was initiated.

User Story

As an operator running a back-migration (B → A) onto a node A that is currently running and has previously been an active participant, I want the migration to succeed without restarting A — or, if a restart is required by design, for that requirement to be documented and the error message to say so.

Acceptance Criteria

Resources & Additional Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions