harbor run -t rounakbende10/task-0567harbor download rounakbende10/task-0567Title: VEP-141 : Migrate disk source path modification to target-side pre-migration hook
Add DiskSourcePathHook that updates disk source file paths in the domain XML on the target virt-launcher pod by replacing the VMI namespace segment with the target domain namespace.
Currently, disk source path adjustments happen on the migration source side. This is problematic because during upgrades, only the target pod runs the new virt-launcher image while the source pod still runs the old one. If a bug fix is applied to this logic, it will not take effect during rolling upgrades since the source pod cannot be updated. Moving these modifications to the target side ensures that fixes are always applied by the new code.
As part of VEP-141 Beta, all target-specific domain XML modifications are being moved to target-side pre-migration hooks.
The source-side logic is kept (with a TODO to remove post-GA) because it is still needed when the LibvirtHooksServerAndClient feature gate is disabled.
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Functional tests: No new e2e tests are needed. The existing migration e2e tests already cover disk path correctness during live migration. This change applies the same transformation on the target side, so the existing tests validate the end result.
Modify the repository so that the issue described above is resolved. The task's test suite verifies your patch by applying it on top of the base commit 9074643d38b6 and running the modified tests.