Red Hat Bugzilla – Bug 1293241
libvirt should forbid set 0,^0 in cpuset instead of generate a xml which have broken settings
Last modified: 2016-11-03 14:49:51 EDT
Description of problem: libvirt should forbid set 0,^0 in cpuset instead of generate a xml which have broken settings Version-Release number of selected component (if applicable): libvirt-1.2.17-13.el7_2.2.x86_64 How reproducible: 100% Steps to Reproduce: 1.prepare a inactive guest: # virsh list --all Id Name State ---------------------------------------------------- - RHEL71-lhuang shut off 2. edit xml and add vcpupin/emulatorpin like this: <cputune> <vcpupin vcpu='0' cpuset='0,^0'/> </cputune> # virsh edit RHEL71-lhuang Domain RHEL71-lhuang XML configuration edited. 3. recheck the xml: # virsh dumpxml RHEL71-lhuang ... <cputune> <vcpupin vcpu='0' cpuset=''/> </cputune> ... 4. restart libvirtd guest will disappear since xml have broken setting: # service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service # virsh dumpxml RHEL71-lhuang error: failed to get domain 'RHEL71-lhuang' error: Domain not found: no domain with matching name 'RHEL71-lhuang' Actual results: when set 0,^0 in cpuset in emulatorpin/vcpupin element, libvirt generate a xml which have broken settings Expected results: like iothread, output error: # virsh edit RHEL71-lhuang error: unsupported configuration: Invalid value of 'cpuset': 0,^0 Failed. Try again? [y,n,i,f,?]: Additional info:
Fixed upstream: commit 31b782a147b9b4a9aa758d8eba9fba5b72a6abb1 Author: Peter Krempa <pkrempa@redhat.com> Date: Wed Jan 6 15:34:13 2016 +0100 conf: disallow empty cpusets for vcpu pinning when parsing XML They are disallowed in the pinning API and as default cpuset. v1.3.1-66-g7639417
Verify this bug with libvirt-1.3.4-1.el7.x86_64: 1. prepare a guest: # virsh list --all Id Name State ---------------------------------------------------- - rhel72-test shut off 2. add empty cpuset in guest xml # virsh edit rhel72-test <cputune> <vcpupin vcpu='0' cpuset='0,^0'/> </cputune> error: unsupported configuration: Invalid value of 'cpuset': 0,^0 Failed. Try again? [y,n,i,f,?]:
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