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

Remove ReqwestBlockIO and VolumeConstructionRequest::Url #1293

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

faithanalog
Copy link
Contributor

@faithanalog faithanalog commented May 13, 2024

As far as I can tell, nothing uses this anymore. With the exception of a pantry integration test. That test is not interested in the Reqwest part, and is just interested in a read-only parent with random data in it, so I changed that to use a tempfile read-only parent.

Propolis will need to be updated. It has exactly one reference to
VolumeConstructionRequest::Url:

bin/propolis-server/src/lib/initializer.rs
385:                    VolumeConstructionRequest::Url { id, .. } => id.to_string(),

That reference is in some code that's extracting the UUIDs out of all the VCR types, and also doesn't care about the Reqwest functionality.

This change still leaves in the pantry functionality to import from a URL. If we did at some point bring back support for booting a disk from an arbitrary URL, that feels like a better way to do it to me. If we do requests on-demand to the URL (the way ReqwestBlockIO does) we're subject to latency problems, the web server not supporting range requests, the web server straight up dying. whereas, while importing to pantry still has the tricky problem of making sure the URL is one we'd accept, it's much less spicy during VM operation.

As far as I can tell, nothing uses this anymore. With the exception of a
pantry integration test. That test is not interested in the Reqwest
part, and is just interested in a read-only parent with random data in
it, so I changed that to use a tempfile read-only parent.

Propolis will need to be updated. It has exactly one reference to
`VolumeConstructionRequest::Url`:

    bin/propolis-server/src/lib/initializer.rs
    385:                    VolumeConstructionRequest::Url { id, .. } => id.to_string(),

This is in some code that's extracting the UUIDs out of all the VCR
types, and also doesn't care about the Reqwest functionality.
Copy link
Contributor

@jmpesp jmpesp left a comment

Choose a reason for hiding this comment

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

I'm for it, except for what's mentioned in the comment, unfortunately.

@@ -18,11 +18,6 @@ pub enum VolumeConstructionRequest {
sub_volumes: Vec<VolumeConstructionRequest>,
read_only_parent: Option<Box<VolumeConstructionRequest>>,
},
Url {
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, I think we need to confirm that there's no existing VolumeConstructionRequest in the wild with this variant - removing this means that record won't deserialize.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah agreed. i think its unlikely but we've still got to check

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