operator icon indicating copy to clipboard operation
operator copied to clipboard

PWX-34271: live migrate KubeVirt VMs before PX upgrade

Open pureneelesh opened this issue 10 months ago • 2 comments

What this PR does / why we need it:

In order to avoid downtime for KubeVirt VMs, the operator live-migrates the VMs before deleting the PX pod during an upgrade.

NoSchedule taint is added to the nodes before the VM live-migration to prevent any other VMs from landing on those nodes. Taint is removed once the node is upgraded. Added toleration for this taint to the PX pods.

We ignore the VMs that are not live migratable. If VM eviction fails, the node upgrade is blocked and an event is generated.

Which issue(s) this PR fixes (optional) PWX-34271

Special notes for your reviewer:

pureneelesh avatar Apr 30 '24 05:04 pureneelesh

Need to take a look at the test code. Will do it in another pass.

pp511 avatar May 02 '24 20:05 pp511

Codecov Report

Attention: Patch coverage is 76.47059% with 48 lines in your changes are missing coverage. Please review.

Project coverage is 80.28%. Comparing base (493a1d8) to head (15875ac).

Files Patch % Lines
pkg/controller/storagecluster/update.go 68.93% 21 Missing and 11 partials :warning:
pkg/controller/storagecluster/kubevirt.go 88.88% 7 Missing and 3 partials :warning:
pkg/controller/storagecluster/util.go 40.00% 6 Missing :warning:
Additional details and impacted files
@@                Coverage Diff                 @@
##           release-24.1.0    #1533      +/-   ##
==================================================
- Coverage           80.32%   80.28%   -0.05%     
==================================================
  Files                  60       61       +1     
  Lines               17857    18051     +194     
==================================================
+ Hits                14344    14492     +148     
- Misses               2525     2557      +32     
- Partials              988     1002      +14     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 07 '24 18:05 codecov[bot]