Red Hat Bugzilla – Bug 1278404
error "unsupported migration cookie feature memory-hotplug" is reported despite migration working
Last modified: 2016-11-03 14:29:54 EDT
Description of problem: Libvirt errorneously reports "unsupported migration cookie feature memory-hotplug" even when destination host actually supports it. Version-Release number of selected component (if applicable): Upstream 1.2.18, downstream 1.2.17-3.el7 How reproducible: 100% Steps to Reproduce: 1. Migrate a guest with <maxMemory> set. 2. Look at destination log files. 3. Actual results: Migration succeeds, but bogus error is reported in the log file.
In the migration cookie parser code, there are two checks : for (i = 0; i < n; i++) { int val; char *str = virXMLPropString(nodes[i], "name"); if (!str) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing feature name")); goto error; } if ((val = qemuMigrationCookieFlagTypeFromString(str)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown migration cookie feature %s"), str); VIR_FREE(str); This one produces the error message and rejects the migration in legitimate purposes in case where destination does not support it. (Prior to upstream commit 136f3de4112c75af0b38fc1946f44e3658ed1890). goto error; This branch also correctly aborts the migration. } What I missed while writing and testing the commit mentioned above is the following check: if ((flags & (1 << val)) == 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Unsupported migration cookie feature %s"), Since the commit mentioned above didn't add the correct flag to 'flags' at the point where it's called, this error message get's always printed once the memory hotplug flag is parsed ... str); VIR_FREE(str); ... but due to a missing 'goto error;' it's not actually rejected, but the error is logged. } VIR_FREE(str); }
Upstream fix: commit f59808b724f99d43d042600455f55428a88a1ad9 Author: Peter Krempa <pkrempa@redhat.com> Date: Thu Nov 5 15:20:21 2015 +0100 qemu: migration: Properly parse memory hotplug migration flag Since the flag was not enabled when 'eating' the migration cookie, libvirt reported a bogus error when memory hotplug was enabled: unsupported migration cookie feature memory-hotplug The error was ignored though due to a bug in the code so it slipped through testing. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1278404
I can reproduce this with build libvirt-1.2.17-3.el7.x86_64
I can reproduce on build libvirt-1.2.17-13.el7.x86_64 Verify pass on build libvirt-2.0.0-5.el7.x86_64 Steps: 1. Prepare a guest with maxmemory setting: # virsh dumpxml rhel7 ... <maxMemory slots='16' unit='KiB'>1524288</maxMemory> ... <cpu mode='custom' match='exact'> <model fallback='allow'>IvyBridge</model> <numa> <cell id='0' cpus='0-1' memory='512000' unit='KiB'/> <cell id='1' cpus='2-3' memory='512000' unit='KiB'/> ... 2. Start guest 3. Do migrate 4. Check libvirtd log on target, there is no such log: internal error: Unsupported migration cookie feature memory-hotplug
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2577.html