Skip to content
/ incus Public
forked from lxc/incus

Commit

Permalink
incusd/instances_post: Fix migrating into remote cluster
Browse files Browse the repository at this point in the history
Closes lxc#879

Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed May 23, 2024
1 parent 65783fd commit 690aa61
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cmd/incusd/instances_post.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,7 @@ func createFromMigration(ctx context.Context, s *state.State, r *http.Request, p

// Decide if this is an internal cluster move request.
var clusterMoveSourceName string
if r != nil && isClusterNotification(r) {
if req.Source.Source == "" {
return response.BadRequest(fmt.Errorf("Source instance name must be provided for cluster member move"))
}

if r != nil && isClusterNotification(r) && req.Source.Source != "" {
clusterMoveSourceName = req.Source.Source
}

Expand Down

0 comments on commit 690aa61

Please sign in to comment.