Skip to content

Add VolumeInfo#1928

Merged
jmpesp merged 2 commits into
oxidecomputer:mainfrom
jmpesp:volume_status
Apr 27, 2026
Merged

Add VolumeInfo#1928
jmpesp merged 2 commits into
oxidecomputer:mainfrom
jmpesp:volume_status

Conversation

@jmpesp

@jmpesp jmpesp commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Add a new VolumeInfo enum that will be returned and provide a richer tree of information that matches the shape of the Volume. The intended consumer of this is the control plane in a few areas:

  • when performing region replacement or region snapshot replacement, the control plane needs to know when to consider the live repair or reconciliation successful, ultimately proceeding to cleaning up the temporary resources and continuing with another replacement. The upstairs has always been the source of this answer but the plan is to move from using activation as this signal to using this introduced enum

  • when activating with only 2 out of 3 downstairs available, the control plane needs to know the difference between an unhealthy volume and one that activated early with 2 out of 3 but eventually had all 3 mirrors online.

  • in the future, the control plane could query for health when performing updates or sled reboots, pausing until impacted Volumes become healthy again

The VolumeInfo enum already existed so this PR renames that to VolumeExtentInfo. Eventually we should probably combine the two.

Add a new VolumeInfo enum that will be returned and provide a richer
tree of information that matches the shape of the Volume. The intended
consumer of this is the control plane in a few areas:

- when performing region replacement or region snapshot replacement, the
  control plane needs to know when to consider the live repair or
  reconciliation successful, ultimately proceeding to cleaning up the
  temporary resources and continuing with another replacement. The
  upstairs has always been the source of this answer but the plan is to
  move from using activation as this signal to using this introduced
  enum

- when activating with only 2 out of 3 downstairs available, the control
  plane needs to know the difference between an unhealthy volume and one
  that activated early with 2 out of 3 but eventually had all 3 mirrors
  online.

- in the future, the control plane could query for health when
  performing updates or sled reboots, pausing until impacted Volumes
  become healthy again

The VolumeInfo enum already existed so this PR renames that to
VolumeExtentInfo. Eventually we should probably combine the two.
@jmpesp jmpesp requested a review from leftwo April 23, 2026 18:57
@jmpesp

jmpesp commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

Example output from a healthy volume:

  "info": {
    "volume": {
      "sub_volumes": [
        {
          "upstairs": {
            "state": "active",
            "block_size": 512,
            "upstairs_id": "08166582-285a-46a4-98cc-6f5eb966733b",
            "session_id": "db05a92f-f220-4611-aa4b-3d448f885045",
            "generation": 1776970947,
            "read_only": false,
            "encrypted": true,
            "reconcile_in_progress": false,
            "live_repair_in_progress": false,
            "targets": [
              {
                "region_id": "b3092ac3-115a-4480-8d30-3c20fca254c2",
                "target_addr": "127.0.0.1:44101",
                "repair_addr": "[::]:48101",
                "state": {
                  "type": "active"
                }
              },
              {
                "region_id": "73c9cd9f-8c8e-4cea-96ff-cae21dcc53dc",
                "target_addr": "127.0.0.1:44102",
                "repair_addr": "[::]:48102",
                "state": {
                  "type": "active"
                }
              },
              {
                "region_id": "9063af2f-7331-41ba-8bc8-db5d308a1228",
                "target_addr": "127.0.0.1:44103",
                "repair_addr": "[::]:48103",
                "state": {
                  "type": "active"
                }
              }
            ]
          }
        }
      ],
      "read_only_parent": null
    }
  }

@jmpesp

jmpesp commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

Example where I took the first downstairs offline:

  "info": {
    "volume": {
      "sub_volumes": [
        {
          "upstairs": {
            "state": "active",
            "block_size": 512,
            "upstairs_id": "08166582-285a-46a4-98cc-6f5eb966733b",
            "session_id": "db05a92f-f220-4611-aa4b-3d448f885045",
            "generation": 1776970947,
            "read_only": false,
            "encrypted": true,
            "reconcile_in_progress": false,
            "live_repair_in_progress": false,
            "targets": [
              {
                "region_id": "b3092ac3-115a-4480-8d30-3c20fca254c2",
                "target_addr": "127.0.0.1:44101",
                "repair_addr": null,
                "state": {
                  "type": "connecting",
                  "state": "negotiating",
                  "mode": "faulted"
                }
              },
              {
                "region_id": "73c9cd9f-8c8e-4cea-96ff-cae21dcc53dc",
                "target_addr": "127.0.0.1:44102",
                "repair_addr": "[::]:48102",
                "state": {
                  "type": "active"
                }
              },
              {
                "region_id": "9063af2f-7331-41ba-8bc8-db5d308a1228",
                "target_addr": "127.0.0.1:44103",
                "repair_addr": "[::]:48103",
                "state": {
                  "type": "active"
                }
              }
            ]
          }
        }
      ],
      "read_only_parent": null
    }
  }

then brought it back up:

  "info": {
    "volume": {
      "sub_volumes": [
        {
          "upstairs": {
            "state": "active",
            "block_size": 512,
            "upstairs_id": "08166582-285a-46a4-98cc-6f5eb966733b",
            "session_id": "db05a92f-f220-4611-aa4b-3d448f885045",
            "generation": 1776970947,
            "read_only": false,
            "encrypted": true,
            "reconcile_in_progress": false,
            "live_repair_in_progress": true,
            "targets": [
              {
                "region_id": "b3092ac3-115a-4480-8d30-3c20fca254c2",
                "target_addr": "127.0.0.1:44101",
                "repair_addr": "[::]:48101",
                "state": {
                  "type": "live_repair"
                }
              },
              {
                "region_id": "73c9cd9f-8c8e-4cea-96ff-cae21dcc53dc",
                "target_addr": "127.0.0.1:44102",
                "repair_addr": "[::]:48102",
                "state": {
                  "type": "active"
                }
              },
              {
                "region_id": "9063af2f-7331-41ba-8bc8-db5d308a1228",
                "target_addr": "127.0.0.1:44103",
                "repair_addr": "[::]:48103",
                "state": {
                  "type": "active"
                }
              }
            ]
          }
        }
      ],
      "read_only_parent": null
    }
  }

@jmpesp

jmpesp commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

And here's a reconcile:

  "info": {
    "volume": {
      "sub_volumes": [
        {
          "upstairs": {
            "state": "go_active",
            "block_size": 512,
            "upstairs_id": "08166582-285a-46a4-98cc-6f5eb966733b",
            "session_id": "9acfdd86-a830-42bd-8103-e4d46799de26",
            "generation": 1776974377,
            "read_only": false,
            "encrypted": true,
            "reconcile_in_progress": true,
            "live_repair_in_progress": false,
            "targets": [
              {
                "region_id": "b3092ac3-115a-4480-8d30-3c20fca254c2",
                "target_addr": "127.0.0.1:44101",
                "repair_addr": "[::]:48101",
                "state": {
                  "type": "connecting",
                  "state": "reconcile",
                  "mode": "new"
                }
              },
              {
                "region_id": "73c9cd9f-8c8e-4cea-96ff-cae21dcc53dc",
                "target_addr": "127.0.0.1:44102",
                "repair_addr": "[::]:48102",
                "state": {
                  "type": "connecting",
                  "state": "reconcile",
                  "mode": "new"
                }
              },
              {
                "region_id": "9063af2f-7331-41ba-8bc8-db5d308a1228",
                "target_addr": "127.0.0.1:44103",
                "repair_addr": "[::]:48103",
                "state": {
                  "type": "connecting",
                  "state": "reconcile",
                  "mode": "new"
                }
              }
            ]
          }
        }
      ],
      "read_only_parent": null
    }
  }

@leftwo leftwo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor question and request for multiple sub-volume test.

Comment thread integration_tests/src/lib.rs
);
assert_eq!(*state, DownstairsInfoStatus::Active);
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a test here (or somewhere) that verifies a Volume with two sub-volumes will return with the proper info for each level.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 done in be58321

"email": "api@oxide.computer"
},
"version": "1.0.0"
"version": "2.0.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have live update running, and a new pantry with old nexus, will the old nexus still be able to query the new pantry?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, old nexus will be sending requests with the api-version header 1.0.0, and the pantry will handle this by converting the 2.0.0 response to 1.0.0 for those requests.

@jmpesp jmpesp merged commit 3c1708d into oxidecomputer:main Apr 27, 2026
17 checks passed
@jmpesp jmpesp deleted the volume_status branch April 27, 2026 19:14
jmpesp added a commit to oxidecomputer/omicron that referenced this pull request May 26, 2026
Update Crucible from `7103cd3a` to `bd9a0e2a`, picking up the following
PRs:

- Use an explicit rev for oxidecomputer git deps
(oxidecomputer/crucible#1936)
- Add Clone and Deserialize to VolumeInfo et al
(oxidecomputer/crucible#1935)
- Update omicron/oximeter (oxidecomputer/crucible#1933)
- [meta] update to drift 0.1.4 (oxidecomputer/crucible#1932)
- Don't log if there is nothing to log (oxidecomputer/crucible#1930)
- Add VolumeInfo (oxidecomputer/crucible#1928)
- Remove bonus Volume layer (oxidecomputer/crucible#1927)
- Add session and client id to panic messages
(oxidecomputer/crucible#1926)
- [crucible-agent-types] migrate to RFD 619 pattern
(oxidecomputer/crucible#1899)
- Background read-only region creation (oxidecomputer/crucible#1919)
- [crucible-downstairs-repair] switch to RFD 619 pattern
(oxidecomputer/crucible#1901)
- [crucible-pantry] switch to RFD 619 pattern
(oxidecomputer/crucible#1900)
- Use separate in-memory types (oxidecomputer/crucible#1913)
- Remove old field from dtrace action script
(oxidecomputer/crucible#1917)
- Retry data writes that return an IO error
(oxidecomputer/crucible#1915)
- Bump dropshot to 0.17.0 (oxidecomputer/crucible#1909)
- Reject snapshot requests when read-only (oxidecomputer/crucible#1914)
- update ringbuf method, fix clippy lint (oxidecomputer/crucible#1904)
- bump vergen-v9 version too (oxidecomputer/crucible#1903)
- update dropshot to 0.16.7, dropshot-api-manager to 0.5.2
(oxidecomputer/crucible#1851)
- perf-vol.d updates (oxidecomputer/crucible#1898)
- upgrade progenitor to 0.13, reqwest to 0.13
(oxidecomputer/crucible#1854)
- Remove cargo nextest from github workflow, out of space
(oxidecomputer/crucible#1846)
- Add a test for VCR serialize/deserialize (oxidecomputer/crucible#1843)

Update Propolis from `bc489ddf` to `58ab73bd`, picking up the following
PRs:

- Bump crucible to latest, update Omicron, use explicit revs
(oxidecomputer/propolis#1141)
- Add project and silo ids to VM attestation
(oxidecomputer/propolis#1114)
- Update escargot (oxidecomputer/propolis#1139)
- Prefix shebang and mark D scripts as executable
(oxidecomputer/propolis#1140)
- Fix error in propolis-server README (oxidecomputer/propolis#1138)
- [meta] update to drift 0.1.4 (oxidecomputer/propolis#1137)
- Fix Intel CPUID leaf 4 cache topology for SMT
(oxidecomputer/propolis#1002)
- support NVMe Deallocate (oxidecomputer/propolis#1105)
- viona: do not lose used/avail indices (oxidecomputer/propolis#1135)
- viona: multiqueue device should stay multiqueue across migration
(oxidecomputer/propolis#1121)
- Bump crucible rev to latest (oxidecomputer/propolis#1132)
- expand zerocopy IntoBytes/FromByes use in guest memory accesses
(oxidecomputer/propolis#1130)
- dropshot-api-manager 0.7.1 (oxidecomputer/propolis#1129)
- improve slog component setting (oxidecomputer/propolis#1124)
- wait for viona Poller to run before declaring device running
(oxidecomputer/propolis#1118)
- virtio: tolerate importing queues with adjusted size
(oxidecomputer/propolis#1117)
- Run viona unit tests in CI (oxidecomputer/propolis#1120)
- feature gate Crucible-specific boot digest code
(oxidecomputer/propolis#1119)

Also:

- ran `cargo update -p vergen`

- removed the `reqwest012` dependency

- removed `reqwest012_client` from Nexus

- ran `cargo hakari generate` and `cargo hakari manage-deps`

- replace use of `ProgenitorOperationRetry` with
`retry_operation_while_indefinitely`

- during the region replacement drive saga, consume the new `VolumeInfo`
from Propolis and use that to determine when to consider a replacement
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants