Bug 1224587
Summary: | Improve error report for virsh allocpages command | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | vivian zhang <vivianzhang> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | dyuan, lhuang, mzhan, rbalakri |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.17-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 06:39:03 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: |
Description
vivian zhang
2015-05-25 02:10:00 UTC
Patch proposed upstream: https://www.redhat.com/archives/libvir-list/2015-June/msg00310.html Patch pushed upstream: commit 1c24cfe9d8016f7561af7b295835f4d1973243b2 Author: Michal Privoznik <mprivozn> AuthorDate: Mon Jun 8 14:05:25 2015 +0200 Commit: Michal Privoznik <mprivozn> CommitDate: Wed Jun 10 17:27:16 2015 +0200 virNumaSetPagePoolSize: Produce friendlier error message https://bugzilla.redhat.com/show_bug.cgi?id=1224587 The function takes two important arguments (among many others): @node and @page_size. From these two a path under /sys is constructed. The path is then used to read and write the desired size of huge pages pool. However, if the path does not exists due to either @node or @page_size having nonexistent value (e.g. there's no such NUMA node or no page size like -2), an cryptic error message is produced: virsh # allocpages --pagesize 2049 --pagecount 8 --cellno -2 error: Failed to open file '/sys/devices/system/node/node-2/hugepages/hugepages-2049kB/nr_hugepages': No such file or directory Add two more checks to catch this and therefore produce much more friendlier error messages. Signed-off-by: Michal Privoznik <mprivozn> v1.2.16-122-g1c24cfe I can reproduce this issue with libvirt-1.2.15-2.el7.x86_64: 1. # virsh allocpages --cellno -2 --pagesize 2048 --pagecount 1 error: Failed to open file '/sys/devices/system/node/node-2/hugepages/hugepages-2048kB/nr_hugepages': No such file or directory 2. # virsh allocpages --cellno 0 --pagesize 2049 --pagecount 1 error: Failed to open file '/sys/devices/system/node/node0/hugepages/hugepages-2049kB/nr_hugepages': No such file or directory 3. # virsh allocpages --cellno 0 --pagesize -1 --pagecount 1 error: pagesize has to be a number error: numerical overflow: value too large: 18446744073709551615 4. # virsh allocpages --cellno 0 --pagesize 2048 --pagecount -1 error: pagecount has to be a number And verify this bug with libvirt-1.2.17-2.el7.x86_64: 1. # virsh allocpages --cellno -2 --pagesize 2048 --pagecount 1 error: operation failed: NUMA node -2 is not available 2. # virsh allocpages --cellno 0 --pagesize 2049 --pagecount 1 error: operation failed: page size or NUMA node not available 3. # virsh allocpages --cellno 0 --pagesize -1 --pagecount 1 error: Numeric value '-1' for <pagesize> option is malformed or out of range 4. # virsh allocpages --cellno 0 --pagesize 2048 --pagecount -1 error: Numeric value '-1' for <pagecount> option is malformed or out of range 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/RHBA-2015-2202.html |