Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fossedihelm
Copy link
Contributor

What this PR does

// UPGRADE PATH IS

  1. daemonsets - ensures all compute nodes are updated to handle new features
  2. wait for daemonsets to roll over
  3. controllers - ensures control plane is ready for new features
  4. wait for controllers to roll over
  5. apiserver - toggles on new features.

After the virt-handler has been updated, it should be able to communicate with the older virt-launcher.
In #12705 a change of the ParallelMigrationThreads migrationOption has been introduced, which causes a wrong set of the libvirt migration options. In particular, previously the ParallelMigrationThreads migrationOption was set by the virt-handler, and the virt-launcher simply checks its presence or not, and adjusts the libvirt flags and params to enable the multifd.

With #12705 this paradigm changed, demanding the logic from the handler to the launcher; IOW, the handler sets the ParallelMigrationThreads, and the launcher decides whether set or not the libvirt flags and options to enable the multifd.

With same version of handler and launcher, everything is working well, but during upgrades, the launcher version is different from the handler one.

This is causing the migrations to fail due to:
Postcopy is not yet compatible with multifd

References

https://issues.redhat.com/browse/CNV-64362

Why we need it and why it was done in this way

The following tradeoffs were made:

The following alternatives were considered:

Links to places where the discussion took place:

Special notes for your reviewer

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note

 Fix postcopy multifd compatibility during upgrade

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. sig/compute size/S labels Jun 26, 2025
@dosubot dosubot bot added the area/handler label Jun 26, 2025
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @fossedihelm - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

// UPGRADE PATH IS
1. daemonsets - ensures all compute nodes are updated to handle new features
2. wait for daemonsets to roll over
3. controllers - ensures control plane is ready for new features
4. wait for controllers to roll over
5. apiserver - toggles on new features.

After the virt-handler has been updated, it should be
able to communicate with the older virt-launcher.
In kubevirt#12705 a change
of the ParallelMigrationThreads migrationOption has been
introduced, which causes a wrong set of the libvirt migration options.
In particular, previously the ParallelMigrationThreads migrationOption
was set by the virt-handler, and the virt-launcher simply checks its
presence or not, and adjusts the libvirt flags and params to enable the multifd.

With kubevirt#12705 this paradigm changed,
demanding the logic from the handler to the launcher; IOW, the handler sets the
ParallelMigrationThreads, and the launcher decides whether set or not the
libvirt flags and options to enable the multifd.

With same version of handler and launcher, everything is working well, but
during upgrades, the launcher version is different from the handler one.

This is causing the migrations to fail due to:
`Postcopy is not yet compatible with multifd`.

Let's avoid setting the ParallelMigrationThreads option from the virt-handler,
restoring the backward compatibility.

Signed-off-by: fossedihelm <[email protected]>
@fossedihelm fossedihelm force-pushed the fix-postcopy-multifd branch from 3270ded to dd49b4a Compare June 26, 2025 12:12
@xpivarc
Copy link
Member

xpivarc commented Jun 26, 2025

/cherry-pick release-1.6

@kubevirt-bot
Copy link
Contributor

@xpivarc: once the present PR merges, I will cherry-pick it on top of release-1.6 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-1.6

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Member

@xpivarc xpivarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xpivarc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 11, 2025
@iholder101
Copy link
Contributor

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2025
@kubevirt-commenter-bot
Copy link

Required labels detected, running phase 2 presubmits:
/test pull-kubevirt-e2e-k8s-1.31-windows2016
/test pull-kubevirt-e2e-kind-1.30-vgpu
/test pull-kubevirt-e2e-kind-sriov
/test pull-kubevirt-e2e-k8s-1.32-ipv6-sig-network
/test pull-kubevirt-e2e-k8s-1.31-sig-network
/test pull-kubevirt-e2e-k8s-1.31-sig-storage
/test pull-kubevirt-e2e-k8s-1.31-sig-compute
/test pull-kubevirt-e2e-k8s-1.31-sig-operator
/test pull-kubevirt-e2e-k8s-1.32-sig-network
/test pull-kubevirt-e2e-k8s-1.32-sig-storage
/test pull-kubevirt-e2e-k8s-1.32-sig-compute
/test pull-kubevirt-e2e-k8s-1.32-sig-operator

@kubevirt-commenter-bot
Copy link

/retest-required
This bot automatically retries required jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

1 similar comment
@kubevirt-commenter-bot
Copy link

/retest-required
This bot automatically retries required jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-bot kubevirt-bot merged commit 16d22f3 into kubevirt:main Jul 14, 2025
41 checks passed
@kubevirt-bot
Copy link
Contributor

@xpivarc: new pull request created: #15178

Details

In response to this:

/cherry-pick release-1.6

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/handler dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/compute size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants