Skip to content

Commit 46674f8

Browse files
committed
docs(kubevirt): state the preconditions of the eviction comments
The comments on evictionStrategy and workloadUpdateMethods described the new behaviour as if it applied to every VMI. The VMI mutator stamps the cluster strategy into the spec at creation, so a VMI started before LiveMigrateIfPossible keeps LiveMigrate: if it cannot migrate, its drain still blocks and the workload updater's eviction is refused until its VM restarts. The worker case pointed at the wrong mechanism too. CAPK reports a non-migratable VMI under evacuation as a terminal failure, and every kubernetes-nodes group has a MachineHealthCheck, so the Machine gets replaced. Where maxUnhealthy holds remediation back the VM restarts in place, but the failure is never cleared, so the Machine is still replaced later. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent 76b3652 commit 46674f8

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

‎packages/system/kubevirt/templates/kubevirt-cr.yaml‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,20 @@ spec:
123123
migrations:
124124
{{- toYaml . | nindent 6 }}
125125
{{- end }}
126-
evictionStrategy: LiveMigrateIfPossible # a VMI that cannot live-migrate is evicted instead of blocking the node drain
126+
evictionStrategy: LiveMigrateIfPossible # a VMI that cannot live-migrate is evicted instead of blocking the drain; a VMI keeps the strategy it was created with, so a non-migratable one created before this value still blocks until its VM is restarted
127127
virtualMachineOptions:
128128
disableSerialConsoleLog: {}
129129
vmRolloutStrategy: LiveUpdate
130130
workloadUpdateStrategy:
131-
# Evict shuts down VMs that cannot migrate on a KubeVirt upgrade, but it is
132-
# also how such a kubernetes-nodes worker (evictionStrategy External) gets
133-
# the new launcher without a rollout: the eviction marks the VMI for
134-
# evacuation, CAPK drains the tenant node and deletes the VMI, and the VM
135-
# starts it again.
131+
# Evict shuts down VMs that cannot migrate on a KubeVirt upgrade; a VMI still
132+
# carrying LiveMigrate from before evictionStrategy changed refuses the
133+
# eviction and stays on the old launcher. Evict is also how a non-migratable
134+
# kubernetes-nodes worker (evictionStrategy External) gets the new launcher:
135+
# the eviction marks the VMI for evacuation, CAPK drains the tenant node and
136+
# deletes the VMI, and it also marks the KubevirtMachine failed, so the node
137+
# group's MachineHealthCheck replaces the Machine. Where maxUnhealthy holds
138+
# remediation back, the VM starts a new VMI but the Machine stays failed and
139+
# is replaced once remediation is allowed.
136140
workloadUpdateMethods:
137141
- LiveMigrate
138142
- Evict

0 commit comments

Comments
 (0)