Skip to content

A VMM in state 'starting' can receive requests #7398

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions nexus/src/app/sagas/region_replacement_drive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,6 @@ async fn check_from_previous_propolis_step(
// This state is unexpected because we should have already
// returned `DriveCheck::Wait` above.
| VmmState::Migrating => {

return Err(ActionError::action_failed(format!(
"vmm {step_vmm_id} propolis is {state}",
)));
Expand Down Expand Up @@ -929,21 +928,25 @@ async fn srrd_drive_region_replacement_prepare(
);

match &state {
VmmState::Running | VmmState::Rebooting => {
// Propolis server is ok to receive the volume
// replacement request.
VmmState::Running
| VmmState::Rebooting
| VmmState::Starting => {
// Propolis server is expected to be there
// (eventually, in the case of "Starting"), and
Copy link
Member

Choose a reason for hiding this comment

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

I believe that a VMM isn't in the Starting state unless the Propolis server process does exist, FWIW --- if memory serves, that's the distinction between Starting and Creating. It may not yet be incarnating an instance, though.

// is ok to receive the volume replacement
// request.
}

VmmState::Starting
| VmmState::Stopping
VmmState::Stopping
| VmmState::Stopped
| VmmState::Migrating
| VmmState::Failed
| VmmState::Destroyed
| VmmState::SagaUnwound
| VmmState::Creating => {
// Propolis server is not ok to receive volume
// replacement requests, bail out
// Propolis server is not expected to be there,
// or is not ok to receive volume replacement
// requests, bail out
return Err(ActionError::action_failed(format!(
"vmm {} propolis not in a state to receive request",
vmm.id,
Expand Down
Loading