Skip to content

Instance create: Out of capacity 503 error should provide more details #4136

@askfongjojo

Description

@askfongjojo

When the rack runs out of capacity to accommodate a new instance request, the API returns only a generic 503 error:

error; status code: 503 Service Unavailable
{
  "error_code": "ServiceNotAvailable",
  "message": "Service Unavailable",
  "request_id": "e3410cce-f961-4b75-ac38-413fd2ac70c2"
}

It would have been helpful to indicate that the failure is due to insufficient resources. The error message in the Nexus log is reasonably clear and can be passed back to the caller.

02:08:25.331Z INFO 65a11c18-7f59-41ac-b9e7-680627f996e7 (dropshot_external): request completed
    error_message_external = Service Unavailable
    error_message_internal = saga ACTION error at node "server_id": No sleds can fit the requested instance
    file = /home/build/.cargo/git/checkouts/dropshot-a4a923d29dccc492/99cea06/dropshot/src/server.rs:841
    latency_us = 147309
    local_addr = 172.30.2.5:443
    method = POST
    remote_addr = 172.20.17.42:53108
    req_id = e3410cce-f961-4b75-ac38-413fd2ac70c2
    response_code = 503
    uri = //v1/instances?project=try

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions