move instance migration to internal API #6311
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Move instance migration from the external API to the internal API per the determinations in RFD 494. This is almost a purely mechanical change (I have not, for example, changed any API signatures or return values); the only unusual bit is one small adjustment to
Nexus::instance_ensure_registered
to deal with the fact that migration no longer runs in a context where the caller is acting on behalf of a user in a silo.Tests: cargo test; spun up a dev cluster and verified that (1) the migrate endpoint is gone from the external API, (2) it's present on the internal API and reachable from the switch zone, and (3) it behaves as it did before (at least to the extent I could test migration's behavior on a single-machine dev cluster).
Fixes #6173.