reproducer for #8755 - #11101
Draft
sunshowers wants to merge 1 commit into
Draft
Conversation
Created using spr 1.3.6-beta.1
smklein
added a commit
that referenced
this pull request
Aug 19, 2026
…ive VMM The instance_watcher joins vmm rows to instances on instance_id alone, so the VMM it checks may be a migration target or no longer linked to the instance. InstanceStateComputer assumes it is given the active VMM's state, and debug asserts on instance/VMM state pairs that cannot occur for an active VMM, such as an instance in NoVmm paired with a leftover Migrating migration target (reproduced in #11101). The watcher only needs the external instance state corresponding to the observed VMM state, so pass InstanceState::Vmm unconditionally instead of the instance's actual state. Part of the fix for #8755.
smklein
added a commit
that referenced
this pull request
Aug 24, 2026
…nces (#11100) The `instance_watcher` background task's query could return a live VMM row paired with a deleted instance record. Monitoring such a VMM trips debug assertions in `InstanceStateComputer::compute_state_from`, which expects a deleted instance to have no VMM state, causing the test flake in #8755. These fixes include: - The instance-update unwinding tests now clean up their VMM records before deleting the test instance, instead of leaving live VMM rows behind pointing at a deleted instance. This commit changes test cleanup only; it is exercised by the existing unwinding tests, including the formerly flaky `test_migration_source_failed_destroyed_can_unwind`. - The watcher query now skips VMMs in terminal states (`Failed`, `Destroyed`), which will never transition again, so a request to monitor can learn nothing further about them. This commit extends `test_instance_and_vmm_list_by_sled_agent` with an instance in each terminal VMM state and asserts that neither is listed. - The watcher query now filters out deleted instances when joining the `vmm` table with the `instance` table. This commit extends the same test with a deleted instance whose VMM row still exists, again asserting it is not listed. Additionally, it always passes `InstanceState::Vmm` to the `InstanceStateComputer`, to avoid src/dst issues during migration that can cause the `InstanceState` machine to panic. This avoids panicking the test demonstrated in #11101 Fixes #8755.
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.
No description provided.