Skip to content

Commit

Permalink
Merge pull request lxc#1528 from stgraber/main
Browse files Browse the repository at this point in the history
incusd/cluster: Add missing error handling
  • Loading branch information
hallyn authored Dec 18, 2024
2 parents d3c0131 + f2838e8 commit 83b5c05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/incusd/api_cluster_evacuation.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ func evacuateInstancesFunc(ctx context.Context, inst instance.Instance, opts eva
l.Warn("No migration target available for instance")
return nil
}

return err
}

// Start migrating the instance.
Expand Down Expand Up @@ -528,7 +530,7 @@ func evacuateClusterSelectTarget(ctx context.Context, s *state.State, inst insta
// Get the source member info.
srcMember, err := tx.GetNodeByName(ctx, inst.Location())
if err != nil {
return fmt.Errorf("Failed getting current cluster member of instance %q", inst.Name())
return fmt.Errorf("Failed loading location details %q for instance %q in project %q: %w", inst.Location(), inst.Name(), inst.Project().Name, err)
}

sourceMemberInfo = &srcMember
Expand Down

0 comments on commit 83b5c05

Please sign in to comment.