[nexus] Consider SagaUnwound instances Failed#6658
Merged
Conversation
Currently, instances whose active VMM is `SagaUnwound` appear externally as `Stopped`. We decided to report them as `Stopped` because start sagas are permitted to run for instances with `SagaUnwound` active VMMs, and --- at the time when the `SagaUnwound` VMM state was introduced, `Failed` instances could not be started. However, #6455 added the ability to restart `Failed` instances, and #6652 will permit them to be stopped. Therefore, we should recast instances with `SagaUnwound` active VMMs as `Failed`: they weren't asked politely to stop; instead, we attempted to start them and something went wrong...which sounds like `Failed` to me. This becomes more important in light of #6638: if we will attempt automatically restart such instances, they should definitely appear to be `Failed`. The distinction between `Failed` and `Stopped` becomes that `Failed` means "this thing isn't running, but it's supposed to be; we may try to fix that for you if permitted to do so", while `Stopped` means "this thing isn't running and that's fine, because you asked for it to no longer be running". Thus, this commit changes `SagaUnwound` VMMs to appear `Failed` externally.
gjcolombo
approved these changes
Sep 27, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Currently, instances whose active VMM is
SagaUnwoundappear externally asStopped. We decided to report them asStoppedbecause start sagas are permitted to run for instances withSagaUnwoundactive VMMs, and --- at the time when theSagaUnwoundVMM state was introduced,Failedinstances could not be started. However, #6455 added the ability to restartFailedinstances, and #6652 will permit them to be stopped. Therefore, we should recast instances withSagaUnwoundactive VMMs asFailed: they weren't asked politely to stop; instead, we attempted to start them and something went wrong...which sounds likeFailedto me.This becomes more important in light of #6638: if we will attempt automatically restart such instances, they should definitely appear to be
Failed. The distinction betweenFailedandStoppedbecomes thatFailedmeans "this thing isn't running, but it's supposed to be; we may try to fix that for you if permitted to do so", whileStoppedmeans "this thing isn't running and that's fine, because you asked for it to no longer be running". Thus, this commit changesSagaUnwoundVMMs to appearFailedexternally.