Affinity/anti-affinity: error message on member add request can be more user-friendly

Open
#7,789 0 comments 0 reactions 1 assignee View on GitHub

@smklein is already working on this.

Since Mar 13, 2025.

Assessment

This issue has not been assessed yet.

Description

The current error message mentions "reservation" but it's not something user necessarily understands:

$ oxide api /v1/anti-affinity-groups/mongodb-cluster/members/instance/mongodb-xfs-bs4096-primary?project=try -X POST
error; status code: 400 Bad Request
{
  "error_code": "InvalidRequest",
  "message": "Instance cannot be added to anti-affinity group with reservation",
  "request_id": "1406575f-936d-458e-87a1-ec3cd18306be"
}
error

The vmm reservation check is internal to the control plane. For API users, we probably want to frame the error in terms of instance state or the action to take, e.g., "Instance must be stopped to be added to an anti-affinity group".

Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from oxidecomputer/omicron

All issues in oxidecomputer/omicron

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.