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.
Fixed upstream:
commit 85d62624c5d02c38e00a275dc2b2957584454908
Author: Peter Krempa <pkrempa>
Date: Fri May 19 10:25:00 2017 +0200
conf: Don't assign value from ..TypeFromString directly to enum
Enums are unsigned, so it's impossible to check whether the helper
returned -1 for invalid conversions.
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/RHEA-2017:1846
Description of problem: libvirt attach nvdimm device with invalid access type Version-Release number of selected component (if applicable): libvirt-3.2.0-5.el7.x86_64 qemu-kvm-rhev-2.9.0-4.el7.x86_64 kernel-3.10.0-660.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. Create nvdimm file on the host: # truncate -s 512M /tmp/nvdimm # truncate -s 256M /tmp/nvdimm2 2. Start a guest with one nvdimm device successfully. <maxMemory slots='16' unit='M'>2048</maxMemory> <memory unit='M'>1024</memory> <currentMemory unit='M'>512</currentMemory> <vcpu placement='static'>4</vcpu> ....... <cpu mode='host-model' check='partial'> <model fallback='allow'/> <topology sockets='2' cores='1' threads='1'/> <numa> <cell id='0' cpus='0-1' memory='512' unit='M'/> <cell id='1' cpus='2-3' memory='512' unit='M'/> </numa> </cpu> ...... <memory model='nvdimm' access='shared'> <source> <path>/tmp/nvdimm</path> </source> <target> <size unit='M'>512</size> <node>1</node> <label> <size unit='KiB'>256</size> </label> </target> <address type='dimm' slot='0'/> </memory> </devices> 3. Try to attach a nvdimm device with access='shar', attached the device, the access='(null)' # cat nvdimm.xml <memory model='nvdimm' access='shar'> <source> <path>/tmp/nvdimm2</path> </source> <target> <size unit='M'>256</size> <node>1</node> <label> <size unit='KiB'>128</size> </label> </target> <address type='dimm' slot='1'/> </memory> # virsh attach-device r7-4 nvdimm.xml Device attached successfully # virsh dumpxml r7-4 | grep nvdimm -A 15 <memory model='nvdimm' access='shared'> <source> <path>/tmp/nvdimm</path> </source> <target> <size unit='KiB'>524288</size> <node>1</node> <label> <size unit='KiB'>256</size> </label> </target> <alias name='nvdimm0'/> <address type='dimm' slot='0' base='0x100000000'/> </memory> <memory model='nvdimm' access='(null)'> <source> <path>/tmp/nvdimm2</path> </source> <target> <size unit='KiB'>262144</size> <node>1</node> <label> <size unit='KiB'>128</size> </label> </target> <alias name='nvdimm1'/> <address type='dimm' slot='1' base='0x11ffc0000'/> </memory> Actual results: Attached nvdimm device with access='shar' in step3, and the access='null' in dumpxml. Expected results: Get error in step3, as the access type should be 'shared' or 'private'.