Add a Nexus internal API endpoint for disk remove read only parent #2157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When we create a disk, the saga generates both a
disk_idand avolume_idWe use both ids when we create the disk database record:
However, the
volume_idhere is only used as the key to store the volume datain the database. That volume_id is never exposed to anyone outside Nexus.
For the actual volume data structure and later the VolumeConstructionRequest,
we use the value in the
disk_id, but call itvolume_idThis is nice because it means the
volume_idthat propolis receives in the VCRwill match what the console has for a disk uuid, and it means stats will be
recorded under the same UUID.
However, Propolis (who needs to call Nexus and tell it to remove a read only parent
only has the top level disk UUID. The internal "volume_id" is not exposed.
This PR adds a new internal API endpoint that will take the disk UUID, then lookup
the volume_id and then call the volume layer remove read only parent saga. Adding
a layer like this also allows tests that operate only on a volume level to not require
any changes.