mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-05-23 17:43:01 +00:00
Adds ensureVMIsLiveMigratable in TestLiveMigrationInBackground. After the existing wait for virt-launcher pods to reach Running, poll each VMI for the LiveMigratable=True condition. If a VMI fails to become migratable within 120s, delete and recreate it (up to 3 attempts). This works around an upstream KubeVirt race where virt-handler computes the containerdisk checksum before the disk socket is ready, fails, and never retries. The recreated VMI lands on a node that has already cached the containerdisk image, so the socket comes up before virt-handler's first attempt. The race surfaces consistently with the kind v1.36.1 node image, causing TestLiveMigrationInBackground to fail with "Expected at least 3 finished live migrations, got less: 0".