RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1278404 - error "unsupported migration cookie feature memory-hotplug" is reported despite migration working
Summary: error "unsupported migration cookie feature memory-hotplug" is reported despi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1172230 1280419
TreeView+ depends on / blocked
 
Reported: 2015-11-05 12:04 UTC by Peter Krempa
Modified: 2016-11-03 18:29 UTC (History)
9 users (show)

Fixed In Version: libvirt-1.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: Improperly logged error message when migrating with memory hotplug enabled. Consequence: When migrating with memory hotplug enabled the destination host logged a spurious message saying "unsupported migration cookie feature memory-hotplug". This didn't break migration but in cases where the migration would fail for some other reason this would sidetrack from the real cause of the failure. Fix: The error message is suppressed by correctly parsing the migration cookie flags. Result:
Clone Of:
: 1280419 (view as bug list)
Environment:
Last Closed: 2016-11-03 18:29:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Peter Krempa 2015-11-05 12:04:24 UTC
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.

Comment 1 Peter Krempa 2015-11-05 12:09:54 UTC
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);
    }

Comment 3 Peter Krempa 2015-11-06 13:47:27 UTC
Upstream fix:

commit f59808b724f99d43d042600455f55428a88a1ad9
Author: Peter Krempa <pkrempa>
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

Comment 4 zhe peng 2015-11-09 06:30:23 UTC
I can reproduce this with build libvirt-1.2.17-3.el7.x86_64

Comment 8 Fangge Jin 2016-08-17 10:00:56 UTC
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

Comment 10 errata-xmlrpc 2016-11-03 18:29:54 UTC
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


Note You need to log in before you can comment on or make changes to this bug.