Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Cannot trigger ValueError(_("cpuset can only contain numeric, ',', '^', or '-' characters"))
Version-Release number of selected component (if applicable):
virt-manager-1.4.3-3.el7.noarch
How reproducible:
100%
Steps to Reproduce:
1) set cpuset to "1@2" and run below command.
#virt-install --name test1 --memory 1024 --disk /var/lib/libvirt/images/aaa.qcow2 --import --vcpus vcpus=1,cpuset="1@2" --debug
Actual results:
[Fri, 13 Apr 2018 11:44:03 virt-install 19007] ERROR (cli:317) Error: --vcpus vcpus=1,cpuset=1@2: invalid literal for int() with base 10: '1@2'
[Fri, 13 Apr 2018 11:44:03 virt-install 19007] DEBUG (cli:319)
Traceback (most recent call last):
File "/usr/share/virt-manager/virtinst/cli.py", line 1204, in parse
objs = self._parse(inst or self.guest)
File "/usr/share/virt-manager/virtinst/cli.py", line 1565, in _parse
ret = VirtCLIParser._parse(self, inst)
File "/usr/share/virt-manager/virtinst/cli.py", line 1172, in _parse
param.parse_param(self, inst, self.support_cb)
File "/usr/share/virt-manager/virtinst/cli.py", line 928, in parse_param
self.val, self)
File "/usr/share/virt-manager/virtinst/cli.py", line 1546, in set_cpuset_cb
inst.cpuset = val
File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 655, in setter
self._validate_cb(xmlbuilder, val)
File "/usr/share/virt-manager/virtinst/guest.py", line 185, in _validate_cpuset
DomainNumatune.validate_cpuset(self.conn, val)
File "/usr/share/virt-manager/virtinst/domainnumatune.py", line 68, in validate_cpuset
c = int(c)
ValueError: invalid literal for int() with base 10: '1@2'
Expected results:
Below error should be triggered.
raise ValueError(_("cpuset can only contain numeric, ',', '^', or "
"'-' characters"))
Additional info:
re.match("^[0-9,-^]*$", val) has problem. It should be re.match("^[0-9,\-^]*$", val).
There is a better fix in upstream that removes the validation completely as it is also done by libvirt:
commit 39a7cbbad750656a7d89694c3b0341a5ae98d346
Author: Cole Robinson <crobinso>
Date: Mon Jun 4 14:30:26 2018 -0400
domain.numatune: Drop cpuset validation
I can reproduce this issue with package:
virt-manager-1.4.3-3.el7.noarch
Then try to verify this bug with new build:
virt-manager-1.5.0-3.el7.noarch
virt-install-1.5.0-3.el7.noarch
libvirt-4.5.0-16.el7.x86_64
qemu-kvm-rhev-2.12.0-27.el7.x86_64
libvirt-python-4.5.0-1.el7.x86_64
Steps:
1.Check that the correct error report can be triggered:
1.1 virt-install --name test1 --memory 1024 --disk /var/lib/libvirt/images/aaa.qcow2 --import --vcpus vcpus=1,cpuset="1@2"
ERROR invalid argument: Failed to parse bitmap '1@2'
Result:The correct error report has been triggered successfully.
I move this bug from ON_QA to VERIFIED based on above testing.
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://access.redhat.com/errata/RHBA-2019:2232
Description of problem: Cannot trigger ValueError(_("cpuset can only contain numeric, ',', '^', or '-' characters")) Version-Release number of selected component (if applicable): virt-manager-1.4.3-3.el7.noarch How reproducible: 100% Steps to Reproduce: 1) set cpuset to "1@2" and run below command. #virt-install --name test1 --memory 1024 --disk /var/lib/libvirt/images/aaa.qcow2 --import --vcpus vcpus=1,cpuset="1@2" --debug Actual results: [Fri, 13 Apr 2018 11:44:03 virt-install 19007] ERROR (cli:317) Error: --vcpus vcpus=1,cpuset=1@2: invalid literal for int() with base 10: '1@2' [Fri, 13 Apr 2018 11:44:03 virt-install 19007] DEBUG (cli:319) Traceback (most recent call last): File "/usr/share/virt-manager/virtinst/cli.py", line 1204, in parse objs = self._parse(inst or self.guest) File "/usr/share/virt-manager/virtinst/cli.py", line 1565, in _parse ret = VirtCLIParser._parse(self, inst) File "/usr/share/virt-manager/virtinst/cli.py", line 1172, in _parse param.parse_param(self, inst, self.support_cb) File "/usr/share/virt-manager/virtinst/cli.py", line 928, in parse_param self.val, self) File "/usr/share/virt-manager/virtinst/cli.py", line 1546, in set_cpuset_cb inst.cpuset = val File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 655, in setter self._validate_cb(xmlbuilder, val) File "/usr/share/virt-manager/virtinst/guest.py", line 185, in _validate_cpuset DomainNumatune.validate_cpuset(self.conn, val) File "/usr/share/virt-manager/virtinst/domainnumatune.py", line 68, in validate_cpuset c = int(c) ValueError: invalid literal for int() with base 10: '1@2' Expected results: Below error should be triggered. raise ValueError(_("cpuset can only contain numeric, ',', '^', or " "'-' characters")) Additional info: re.match("^[0-9,-^]*$", val) has problem. It should be re.match("^[0-9,\-^]*$", val).