-
Notifications
You must be signed in to change notification settings - Fork 40
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
Perform instance state transitions in instance-update
saga
#5749
Merged
+7,305
−3,018
Merged
Changes from 1 commit
Commits
Show all changes
234 commits
Select commit
Hold shift + click to select a range
f508831
start sketching saga
hawkw 7a8b30e
wip
hawkw 2c0fb3a
wip
hawkw 3331f66
remove dead code
hawkw 76c6960
sketch out the whole "instance destroyed" subsaga
hawkw bc93d0e
fix snapshot-create using renamed API
hawkw de11162
oh, i guess undo actions return anyhow::Error
hawkw 195d747
okay this seems more or less right
hawkw 4405883
add logging to VMM destroyed subsaga
hawkw 756b78b
fixy
hawkw becb3d5
oh we can just call the nexus methods i guess
hawkw 82f4731
wip bgtask stuff
hawkw 88f3b8b
plumbing etc
hawkw e71f8f0
whoops, missing none
hawkw ecbdbca
more plumbing
hawkw 4b80b2b
add configs
hawkw f05e3b3
whoops
hawkw 15770a0
remaining configs
hawkw 41321d4
unassign oximeter producer
hawkw a5b6d9e
update `delete_v2p_mappings` in light of #5568
hawkw 8d9cdb2
tear apart most of `cpapi_instances_put`
hawkw 6850946
rewrite most of the saga
hawkw dc807a9
fixup
hawkw 3a421ed
rm unneeded comment
hawkw d8c0e63
WHEW OKAY
hawkw 0bc3ae3
start ripping out sled-agent instance state munging
hawkw b2cf79c
whoops forgot this one
hawkw a69caf5
wip dead code cleanup
hawkw d1709a5
post merge fixy-wixy
hawkw 6efd374
it's sagas all the way down
hawkw 610d5e0
deal with dead code in a more compiley way
hawkw d3f8b0b
fix up stuff
hawkw f25792f
clean things up a bit
hawkw 78cb0b3
big post-merge update
hawkw 65c77f0
post-rebase fixup
hawkw c59d8f9
regenerate sled-agent openapi
hawkw 63e514e
bunch of saga plumbing fixes
hawkw 6404be6
handle unable-to-lock more gracefully
hawkw a40b35f
fix lock generations getting eaten
hawkw b00683a
more consistent naming for logs
hawkw da48db9
rm dead import
hawkw 8078508
post-rebase remove dead imports
hawkw b791897
update openapi another time
hawkw 2bc8183
hack up the CTE to do vmm-and-migration updates
hawkw 419d067
actually write migration states to the db
hawkw dfe2594
remove duplicate code in CTE
hawkw da7bbb9
add expectorate tests for CTE
hawkw ec93ca9
uuids are typed now
hawkw 4a5368d
tear up way more of sled-agent
hawkw 53299b3
compiley-ness
hawkw 777cdcc
remove most of `instance_set_migration_ids`
hawkw 67c268b
make instance-migrate sagas just set migration IDs
hawkw 3bbe6bb
cleanup
hawkw edbfdc8
update CTE expected SQL
hawkw 3bdb094
whoops that was the sled id and not the vmm ID
hawkw 63ec92a
just return instance in instance_set_migration_ids
hawkw ad94f20
fix sim sled-agent looking at the wrong migration
hawkw 796f759
sled-agent: make sure migration-in is populated
hawkw 64bbb3a
start sketching out migration-update subsaga
hawkw 0cfec53
fix migrate saga sending states without migration IDs
hawkw 74b9e37
more sketching out migration update saga
hawkw ffcc23f
okay, i think this is the migration part
hawkw 932a178
...you have to actually register the saga actions
hawkw 1bda356
obnoxious clippy nonsense
hawkw 9450f31
shut up clippy in a slightly more polite way
hawkw 437cc7a
fix docs
hawkw b2cc1a8
update omdb output
hawkw 0e38a5a
fix(?) illumos-only tests
hawkw 15b8333
put that back
hawkw 3170f41
whoops, imports
hawkw 85db24b
docs build unbreakening
hawkw 5091226
you have to actually update the timestamps
hawkw 3930d06
fix virtual provisioning record not being deleted
hawkw 3d35078
move migration stuff out of a subsaga
hawkw 4c4d648
also get rid of subsaga for active-vmm-destroyed
hawkw d21b60d
clean up network config actions
hawkw 76aee1c
post-rebase fixy-uppy
hawkw e97e6e0
queue update sagas for terminated migrations
hawkw d79050c
add instance-updater omdb stuff
hawkw 583b709
remove max gen from `virtual_provisioning_collection_delete_instance`
hawkw 10594de
clippiness
hawkw 882ebb2
whoops the generation number gets used here
hawkw e3191f1
review feedback from @gjcolombo
hawkw 5a155f5
oops forgot to update tests
hawkw c526add
whoops i forgot to update tests
hawkw d17575d
gotta actually put the instance in the NoVmm state
hawkw a62c99d
oh i guess we can't assert that
hawkw 7b6f5a0
destroy both VMMs from the update saga
hawkw 1b7bfd8
clippy-clean helios sled-agent tests
hawkw 0260f14
post-rebase update for #5985
hawkw 5f3718d
post-rebase update for #5964
hawkw 5e566da
don't wait for saga completion in API endpoint
hawkw 130fca2
use `wait_for_condition` in instance start tests
hawkw 92b5388
also use it in `instance_migrate` tests
hawkw f805c16
refactor `notify_instance_updated` a bit
hawkw f0f20c2
also make snapshot_create tests wait for NoVmm
hawkw ecd0030
clippy cleanliness
hawkw 473299d
fixup instance real state determination
hawkw 5a2404e
make tests wait for states
hawkw 6af03b5
make logging in start saga more useful
hawkw df9e1eb
don't treat instances as stopped until virtual resources are gone
hawkw 9a6b1bf
temp fix sagas not being rescheduled
hawkw 723ae56
instance_wait_for_state should log successful transitions
hawkw ef24a5d
remove defunct test output files
hawkw 4455946
fix `instance_wait_for_state` accidentally using the instance tests p…
hawkw 1e0ed7b
add missing wait for stop in disk tests
hawkw 093ee44
found some more places that need to wait for stop
hawkw edc69a5
WOW THERE'S MORE OF THEM (+authn stuff)
hawkw 77c458a
also include SagaUnwound in stopping
hawkw 8dadd30
oh my god theres even more of them
hawkw a6af286
WHEW OKAY ACTUALLY DO THE MIGRATION
hawkw 06d01c1
another disk test that needs to wait for stop
hawkw b9f5a46
oh there's also pantry tests that stop instances
hawkw a5aa853
clippy cleanliness
hawkw 2cde269
bump instance-updater bg task period in tests
hawkw b46676a
use migration_mark_failed where it's supposed to be used
hawkw 7a75c7b
don't re-query sled ID for network cfg update
hawkw 46ae4cb
slightly more accurate log message
hawkw 3e5b6d1
rm vestigial line
hawkw 32ea68f
THERES MORE OF THEM AGHGHGHGHHGHHGH
hawkw bedcfc6
chain into another saga (bad initial version)
hawkw 529684b
Revert "don't re-query sled ID for network cfg update"
hawkw 84ebd74
found another place we need to wait for stop
hawkw 1cebe3e
update omdb again
hawkw 8526697
clean up saga chaining code
hawkw 1eba9cd
Reapply "don't re-query sled ID for network cfg update"
hawkw 896d21f
cleanup migration update computation
hawkw b09503c
misc review feedback cleanup
hawkw 7ecb9a8
nicer `instance_set_migration_ids`
hawkw d3db859
actually return UPDATED state in `instance_set_migration_ids`
hawkw 6571b1a
single-step through states in migration test
hawkw 1f36487
fix migration-source sled agents creating state at gen 1
hawkw 7b39931
fix migration update query not bumping generation
hawkw 6ef2120
report instance states as "migrating" until migration resolves
hawkw dfc0240
poke instances twice in single-steppy migration test
hawkw c47ed90
gotta wait for update saga to go back to running
hawkw 9f7e101
whoops, migration arm needs to be BEFORE destroyed
hawkw 59cf488
make filter expr more correct and match comment
hawkw b544332
whoops i forgot to update expectorate queries
hawkw e6771fb
add instance_wait_for_state saga test helpers
hawkw a4c3eac
remove test that doesn't really matter
hawkw 9d622f0
remove defunct `instance_put_migration_ids` API
hawkw 91beec6
sled-agent's per-instance logger should have UUIDs
hawkw 96a21d0
misc commentary suggestions from @gjcolombo
hawkw 70a7fbf
wip: instance updater saga tests
hawkw 6951d97
wait for the preceeding update saga to complete
hawkw 579c135
more assertions
hawkw 5f7dbe1
ah, there was already a thingy for that
hawkw 2515d20
additional active_vmm_destroyed tests
hawkw 9f86865
rearrange deck chairs
hawkw d67395e
migration source completed tests
hawkw b9e02bc
add unwinding test for migration source success
hawkw 77a5a85
shut up clippy
hawkw 4d7e582
urghh
hawkw 2c86e48
more migration tests
hawkw 8dae386
massively overengineered test DSL thingy
hawkw 98d5c4a
fix disappearing target sled resources
hawkw 1aefe47
avoid spurious update sagas
hawkw f91a2d1
move update saga needed logic into saga module
hawkw e74fe4c
get rid of `write_returned_instance_state`
hawkw 20311aa
cleanup warnings
hawkw 77dc84b
docs unhappiness
hawkw bc4f276
start on the documentation i promised i'd write
hawkw 7abe814
use the same code for determining effective states
hawkw 17bb219
Revert "use the same code for determining effective states"
hawkw 5d699c9
Reapply "use the same code for determining effective states"
hawkw 0146cc7
cleanup visibilities
hawkw 1805b8d
ensure lock is reliably unlocked when unwinding
hawkw 80bb38d
assert instance state is consistent when unwinding
hawkw f7afb85
start on migration failure tests
hawkw 9cca199
test more destroyed outcomes
hawkw af207ca
more commentary
hawkw 7998371
more of my nonsense
hawkw de9391b
misc style consistency/cleanup
hawkw c0a4dda
don't need to serialize the entire snapshot
hawkw 0090402
finish the Next Great American Novel
hawkw 237831c
whoops i broke it
hawkw e2f451d
serialize less stuff
hawkw 6902907
oops lol
hawkw 9f3ba51
fix docs links (oops)
hawkw eab900c
remove second bonus license header
hawkw 77af396
fix typo (thanks @bcantrill)
hawkw 4fd8320
instance_and_vmm_update_runtime is dead code now
hawkw 368dacf
CTE only does VMM and migration updates
hawkw b9f7711
separate "commit updates and unlock" and "just unlock now please" ope…
hawkw 377bda1
fixup tests
hawkw 6f74ced
fixup tests, add test for unlocking a deleted instance
hawkw 836ea7d
activate network RPWs when they're likely to see new state
hawkw 0208526
post-rebase fixup (PutMigrationIds went away)
hawkw 0f5e340
update saga should also unlink `SagaUnwound` VMMs
hawkw c4c3ec8
allow start sagas to clobber saga-unwound VMMs
hawkw 8d23d66
properly handle SagaUnwound, part 2
hawkw f8b44f6
fix target VMM unwound check when setting migration IDs
hawkw ddbf2fa
placate clippy
hawkw f301183
remove log file (oops)
hawkw d68f0de
start addressing @smklein's review suggestions
hawkw 3cdac70
fix comments
hawkw bfd2c32
`InstanceGestalt` RIDES AGAIN!
hawkw 12f69b4
update openapi (changed a comment)
hawkw 558de3c
don't duplicate `SimulatedMigration` API types
hawkw b7075b6
better document unwinding behavior
hawkw 48be892
update openapi yet again
hawkw e2a1ee5
fix typo
hawkw a0e6042
turns out we can just totally disable it in tests
hawkw 0b89c58
turns out it's fine to not unlock deleted instances
hawkw 9788b40
fix unfinished comments
hawkw 9d331d6
lol, OMDB panics when it's Duration::MAX
hawkw d61d137
initial test for `vmm_and_migration_update_runtime`
hawkw b657fbc
actually repro the problem
hawkw bfb85af
replace vmm/migration CTE with transaction
hawkw 4b7fe6b
don't reject runtime states with no migration
hawkw c7efd47
start addressing @gjcolombo's feedback
hawkw 8e49853
rm extra backtick
hawkw 5754b3a
activate bg task when dropping lock on unwind
hawkw 4487a6a
don't unset migration IDs in migration unwind
hawkw 90b2d04
fix "succeed idempotently" tests not testing that
hawkw 73cdb72
tests for migration completed but target VMM destroyed
hawkw b031bd0
correctly handle target destroyed migration success
hawkw 18b2f32
fix start saga unwinding if duplicate child unwinds
hawkw c8b7421
fix completed updates spawning spurious update sagas
hawkw 20a222b
update tests to new migrate saga unwinding behavior
hawkw 77594e3
saga idempotency tests should test the real saga
hawkw 8cd3378
also run unwinding tests with "real" saga
hawkw e04b278
add back start saga unwinding/idempotency tests
hawkw caa4263
release lock if child sagas unwind before locking
hawkw 59adbf4
turns out there's a normal reason that could happen
hawkw 9461168
rename `UpdatesRequired::for_snapshot`
hawkw 2253390
'rename symbol' doesnt work on docs
hawkw 47d8c38
improve errors/log messages
hawkw 58bb353
update instance lock tests to match new behavior
hawkw c707814
fix `instance_commit_update` idempotency
hawkw 8ed6dc6
fail to commit update if gen has advanced while locked
hawkw d93a80b
use `InstanceAndVmm::effective_state` in start
hawkw 67c424c
document more saga interactions
hawkw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
make logging in start saga more useful
commit 6af03b580765182b6c4278a733414fd71750e5ab
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to my self-published debut novel, "instance update saga: theory of operation" if you're wondering why this weird little thing exists.