Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incusd/cluster: Add missing error handling #1528

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading