From a1821f9a2a38b1f967b9e303764d547be18e9465 Mon Sep 17 00:00:00 2001 From: yaroslavborbat Date: Tue, 3 Dec 2024 10:48:14 +0300 Subject: [PATCH] fix Signed-off-by: yaroslavborbat --- images/virt-artifact/patches/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/images/virt-artifact/patches/README.md b/images/virt-artifact/patches/README.md index 1f02e2646..c599721c6 100644 --- a/images/virt-artifact/patches/README.md +++ b/images/virt-artifact/patches/README.md @@ -87,3 +87,8 @@ This is necessary because of the kube-api-rewriter that changes the labels. #### `024-auto-migrate-if-nodeplacement-changed.patch` Start the migration if the nodeSelector or affinity has changed. +How does it work? +1. When changing the affinity or nodeSelector in the vm, the vm controller updates the vmi specification. +2. When changing the affinity or nodeSelector in vmi, the vmi controller will set the `NodePlacementNotMatched` condition to True in vmi. +3. The workload-updater controller monitors the vmi and starts migration when there is a `NodePlacementNotMatched` conditions on the vmi. +4. When the migration is completed, virt-handler will remove the condition `NodePlacementNotMatched` from the vmi