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

image import failed after recent pantry API changes #4595

Closed
davepacheco opened this issue Dec 1, 2023 · 4 comments
Closed

image import failed after recent pantry API changes #4595

davepacheco opened this issue Dec 1, 2023 · 4 comments
Assignees
Labels
api Related to the API.
Milestone

Comments

@davepacheco
Copy link
Collaborator

tl;dr: oxidecomputer/crucible#1039 changed the pantry API incompatibly to match our API guidelines, replacing underscores with hyphens. As of Omicron "main" right now, the Pantry implementation that we're pulling in post-dates this change, but the crucible-pantry-client implementation that we're pulling in predates it. This breaks image import and I'm not sure what else.


How I got here: I tried to import an image and got:

dap@ivanova ~ $ oxide disk import --path debian-11-genericcloud-amd64.raw --disk debian-boo --project test-project --description debian --snapshot debian-import --image debian --image-description debian --image-os debian --image-version 11
[00:00:00] [███░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 194.00 MiB/2.00 GiB (783.64 MiB/s, 2s)sending chunk to thread failed with SendError { .. }
channel closed

(I filed oxidecomputer/oxide.rs#448 for having the CLI provide more detail on this failure mode.)

I went looking at one of the Nexus logs for message emitted when this happens and I found:

16:33:50.143Z INFO f45dcde1-e10d-440b-ade6-a9ab6f283652 (dropshot_external): request completed 
    error_message_external = Internal Server Error
    error_message_internal = error sending bulk write to pantry: Communication Error: error sending request for url (http://[fd00:1122:3344:102::5]:17000/crucible/pantry/0/volume/b6db3011-b1cd-43f5-a1e6-611248d65a00/bulk_write): error writing a body to connection: Broken pipe (os error 32)
    file = /home/build/.cargo/git/checkouts/dropshot-a4a923d29dccc492/ff87a01/dropshot/src/server.rs:841
    latency_us = 371589
    local_addr = 172.30.2.6:443
    method = POST 
    remote_addr = 172.20.2.70:46781
    req_id = 852eddaa-2464-4844-8211-6628a664495c
    response_code = 500
    uri = //v1/disks/debian-boo/bulk-write?project=test-project

Over in the pantry, I'm not sure which messages were relevant (I did not find any with that req_id) but I did find a bunch of messages like this for the same volume id:

16:33:49.922Z INFO crucible-pantry (dropshot): request completed
    error_message_external = Not Found
    error_message_internal = no route found (no path in router)
    latency_us = 24
    local_addr = [fd00:1122:3344:102::5]:17000
    method = POST
    remote_addr = [fd00:1122:3344:102::4]:42461
    req_id = fd8c1805-0f02-4961-99d7-3c48d9e33009
    response_code = 404
    uri = /crucible/pantry/0/volume/b6db3011-b1cd-43f5-a1e6-611248d65a00/bulk_write

These are dropshot reporting that there is no route handler for this route, which is pretty unusual. That's when I went looking for a breaking API change and found the above.

@leftwo leftwo self-assigned this Dec 1, 2023
@bnaecker
Copy link
Collaborator

bnaecker commented Dec 1, 2023

Ugh, sorry about this one. I definitely just missed these dependencies in the top-level Cargo.toml.

@leftwo
Copy link
Contributor

leftwo commented Dec 1, 2023

Ugh, sorry about this one. I definitely just missed these dependencies in the top-level Cargo.toml.

Your reviewer shares the blame here too.

@leftwo
Copy link
Contributor

leftwo commented Dec 1, 2023

#4597

@leftwo
Copy link
Contributor

leftwo commented Dec 1, 2023

The fix is in: #4597

@leftwo leftwo closed this as completed Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the API.
Projects
None yet
Development

No branches or pull requests

4 participants