postcopy migration fails in hirsute (solved)

Bug #1926249 reported by Christian Ehrhardt 
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Nova Compute Charm
Triaged
Medium
Unassigned
qemu (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

FYI: this is an intended change, can be overwritten via config and this bug is mostly to have something puzzled users can find via search engines to explain and solve their issue.

postcopy migration can in some cases be very useful
=> https://wiki.qemu.org/Features/PostCopyLiveMigration

But with Hirsute kernel being 5.11 that now contains the following upstream change
=> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0d4730ac2

Due to that postcopy migration will fail like:

+ lxc exec testkvm-focal-from -- virsh migrate --unsafe --live --postcopy --postcopy-after-precopy kvmguest-focal-postcopy qemu+ssh://10.85.93.248/system
error: internal error: unable to execute QEMU command 'migrate-set-capabilities': Postcopy is not supported

This will also apply to e.g. a Focal-HWE kernel once on v5.11 or to Focal userspaces in a container under a Hirsute kernel (that is the example above).

This was done for security reasons, if you want/need to re-enable un-limited userfault handling to be able to use postcopy again you'd want/need to set the control knob to one like:
$ sudo sysctl -w "vm.unprivileged_userfaultfd=1"

Changed in qemu (Ubuntu):
status: New → Invalid
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Felipe Alencastro (falencastro) wrote :

juju config live-migration-permit-post-copy on the nova-compute charm, could auto enable vm.unprivileged_userfaultfd=1, or at least state this requirement on it's description.

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

I'm assigning this to won't fix based on it being a hirsute issue. Hirsuite is EOL as of January 20, 2022. However, if this is affecting newer releases of Ubuntu then please re-open. thanks.

Changed in charm-nova-compute:
status: New → Won't Fix
Revision history for this message
Felipe Alencastro (falencastro) wrote :

Hi @ajkavanagh, this affects focal-hwe, jammy and will affect any new releases unless this sysctl is set to 1.

no longer affects: charm-nova-compute
no longer affects: qemu
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Based on @felipe's comment in #4, I'm triaging to medium. A possible fix is to enable the sysctl to be executed if the config option " enable-live-migration" is set to True in the charm. This is relatively easy to do. It should also be documented in the charm-guide if the fix is done.

Changed in charm-nova-compute:
importance: Undecided → Medium
status: New → Triaged
tags: added: good-first-bug
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.