Bug 1046833
Summary: | Warn users against setting memory hard limit too high when used for mlock or rdma-pin-all | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Qunfang Zhang <qzhang> |
Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 7.0 | CC: | dyuan, eblake, fjin, hhuang, jdenemar, juzhang, juzhou, michen, mzhan, pbonzini, quintela, rbalakri, virt-maint, xfu, ydu, zpeng |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-2.0.0-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-03 18:07:24 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1013055, 1138485 | ||
Bug Blocks: |
Description
Qunfang Zhang
2013-12-27 03:45:57 UTC
I think QEMU is being OOM-killed, which means this bugs really cannot be fixed. (In reply to Paolo Bonzini from comment #2) > I think QEMU is being OOM-killed, which means this bugs really cannot be > fixed. Could we give some prompt in advance when the guest memory is too large and when we set the "x-rdma-pin-all" on? (In reply to Qunfang Zhang from comment #0) > Steps to Reproduce: > 1. Boot a guest with v-mem and host p-mem. Adding one step here: Enable "x-rdma-pin-all": (qemu) migrate_set_capability x-rdma-pin-all on > > 2. Boot the guest on destination host with "-incoming x-rdma:0:5800" > > 3. Migrate the guest > (qemu) migrate -d x-rdma:192.168.1.3:5800 > (In reply to Qunfang Zhang from comment #3) > (In reply to Paolo Bonzini from comment #2) > > I think QEMU is being OOM-killed, which means this bugs really cannot be > > fixed. > > Could we give some prompt in advance when the guest memory is too large and > when we set the "x-rdma-pin-all" on? From KVM QE POV, Even we could not do at qemu-kvm level, should be alerted or controlled in upper management tools level, aborted/killed without message could cause final user loss. Best Regards, Junyi Right, you can move this to libvirt. (In reply to Paolo Bonzini from comment #6) > Right, you can move this to libvirt. Moving to libvirt component for a friendly solution. Use of x-rdma-pin-all admits that the feature is experimental; libvirt refuses to drive this option. When rdma-pin-all is made non-experimental and libvirt is enhanced to drive it, we should make sure to avoid letting the user do this, but for now, there is no libvirt bug. I'm not sure what the best resolution is for this bug. Libvirt requires a user or management application to set memory hard limit to be able to start RDMA migration with rdma-pin-all. And we document that the limit has to be high enough for both guest memory and memory consumed by QEMU. While setting the limit close to host memory size does not do anything bad in general, trying to mlock memory of QEMU with such limit may result in QEMU being killed. However, I don't think there's any way libvirt could check if the limit is OK or already too high (the maximum usable limit with be host memory size minus something). The only think we could do is to document this... Documented upstream by v2.0.0-rc2-7-g60a545f. Compare the docs of libvirt-docs-1.2.17-13.el7.x86_64 and libvirt-docs-2.0.0-3.el7.x86_64, a new sentence is added for mlock case in file formatdomain.html, line 1043: "Beware of setting the memory limit too high (and thus allowing the domain to lock most of the host's memory). Doing so may be dangerous to both the domain and the host itself since the host's kernel may run out of memory." But I can't find the sentence for rdma-pin-all case, is it missing? The warning is where the documentation talks about setting memory limits, which is correct. However, it looks like we don't really have any documentation specific to RDMA migration that would point to the memory limits section. (In reply to Jiri Denemark from comment #16) > The warning is where the documentation talks about setting memory limits, > which is correct. However, it looks like we don't really have any > documentation specific to RDMA migration that would point to the memory > limits section. So do you plan to add it? Yes, eventually, but not in 7.3. Track the issue in comment 15/16 in a separate bug: Bug 1373783 - Warn users against setting memory hard limit too high or too low when used for rdma-pin-all 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 |