oxidecomputer / oxidecomputer/omicron

Error on attempt to delete disk in importing state should be more helpful

Open
#5,977 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This is not that helpful a message unless the user is already looking at the relevant doc that would tell them what to do.

"disk cannot be deleted in state \"importing_from_bulk_writes\""

To be more helpful, we could look for that state and add another sentence to the effect of "In order to delete this disk, the import must be stopped and then finalized. Source here:

https://github.com/oxidecomputer/omicron/blob/a14b41a2342fc3e8dcb2abf777a82289055e39c8/nexus/db-queries/src/db/datastore/disk.rs#L635-L639

Related issues

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.

Research direction

Start in nexus/db-queries/src/db/datastore/disk.rs around lines 635-639, where the disk deletion state error is assembled. Check the handling of importing_from_bulk_writes and update the message with the stop-and-finalize guidance and documentation link described in the issue. Done means deletion attempts in that state provide the more helpful message.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.