Skip to content

reproducer for #8755 - #11101

Draft
sunshowers wants to merge 1 commit into
mainfrom
sunshowers/spr/reproducer-for-8755
Draft

reproducer for #8755#11101
sunshowers wants to merge 1 commit into
mainfrom
sunshowers/spr/reproducer-for-8755

Conversation

@sunshowers

Copy link
Copy Markdown
Contributor

No description provided.

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.
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.

1 participant