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:
When adding a disk to the system or creating a logical volume, an exception is dropped as shown below:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
2019-01-29 17:18:33,003 INFO tuned.plugins.hotplug: device 'dm-2' added
2019-01-29 17:18:33,004 INFO tuned.plugins.hotplug: instance disk: adding new device dm-2
2019-01-29 17:18:33,004 ERROR tuned.hardware.inventory: Exception occured in event handler of '<tuned.plugins.plugin_disk.DiskPlugin object at 0x7ff560840c50>'.
2019-01-29 17:18:33,004 ERROR tuned.hardware.inventory:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/tuned/hardware/inventory.py", line 58, in _handle_udev_event
callback(event, device)
File "/usr/lib/python2.7/site-packages/tuned/plugins/plugin_disk.py", line 54, in _hardware_events_callback
super(DiskPlugin, self)._hardware_events_callback(event, device)
File "/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.py", line 29, in _hardware_events_callback
self._add_device(device)
File "/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.py", line 46, in _add_device
self._added_device_apply_tuning(instance, device_name)
File "/usr/lib/python2.7/site-packages/tuned/plugins/plugin_disk.py", line 58, in _added_device_apply_tuning
instance._load_monitor.add_device(device_name)
File "/usr/lib/python2.7/site-packages/tuned/monitors/base.py", line 102, in add_device
assert isinstance(device, str)
AssertionError
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Version-Release number of selected component (if applicable):
tuned-2.10.0-6.el7.noarch
How reproducible:
Always
Steps to Reproduce:
1. Add a disk to a VM through hotplugging it or create a logical volume
# vgcreate vg1 /dev/sdb
# lvcreate -n vol1 -L 1G vg1
Actual results:
Exception above
Expected results:
No exception and device properly configured by tuned
Additional info:
Instrumenting the code, it appears that the device coming from udev is seen as "unicode" string, which can be seen by adding the log.info() line below:
/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.py:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
def _add_device(self, device):
device_name = device.sys_name
log.info("DEVICE TYPE: %s" % type(device_name))
...
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
We then get the following log when creating a logical volume:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
2019-01-29 17:27:37,269 INFO tuned.plugins.hotplug: device 'dm-3' added
2019-01-29 17:27:37,269 INFO tuned.plugins.hotplug: DEVICE TYPE: <type 'unicode'>
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Later, because of the following line, the assertion fails:
/usr/lib/python2.7/site-packages/tuned/monitors/base.py:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
def add_device(self, device):
assert isinstance(device, str)
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
device.sys_name can probably be converted into a "str", but I'm not completely sure about that:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
def _add_device(self, device):
device_name = str(device.sys_name)
...
def _remove_device(self, device):
device_name = str(device.sys_name)
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
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:2201
Description of problem: When adding a disk to the system or creating a logical volume, an exception is dropped as shown below: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- 2019-01-29 17:18:33,003 INFO tuned.plugins.hotplug: device 'dm-2' added 2019-01-29 17:18:33,004 INFO tuned.plugins.hotplug: instance disk: adding new device dm-2 2019-01-29 17:18:33,004 ERROR tuned.hardware.inventory: Exception occured in event handler of '<tuned.plugins.plugin_disk.DiskPlugin object at 0x7ff560840c50>'. 2019-01-29 17:18:33,004 ERROR tuned.hardware.inventory: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/tuned/hardware/inventory.py", line 58, in _handle_udev_event callback(event, device) File "/usr/lib/python2.7/site-packages/tuned/plugins/plugin_disk.py", line 54, in _hardware_events_callback super(DiskPlugin, self)._hardware_events_callback(event, device) File "/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.py", line 29, in _hardware_events_callback self._add_device(device) File "/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.py", line 46, in _add_device self._added_device_apply_tuning(instance, device_name) File "/usr/lib/python2.7/site-packages/tuned/plugins/plugin_disk.py", line 58, in _added_device_apply_tuning instance._load_monitor.add_device(device_name) File "/usr/lib/python2.7/site-packages/tuned/monitors/base.py", line 102, in add_device assert isinstance(device, str) AssertionError -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Version-Release number of selected component (if applicable): tuned-2.10.0-6.el7.noarch How reproducible: Always Steps to Reproduce: 1. Add a disk to a VM through hotplugging it or create a logical volume # vgcreate vg1 /dev/sdb # lvcreate -n vol1 -L 1G vg1 Actual results: Exception above Expected results: No exception and device properly configured by tuned Additional info: Instrumenting the code, it appears that the device coming from udev is seen as "unicode" string, which can be seen by adding the log.info() line below: /usr/lib/python2.7/site-packages/tuned/plugins/hotplug.py: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- def _add_device(self, device): device_name = device.sys_name log.info("DEVICE TYPE: %s" % type(device_name)) ... -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- We then get the following log when creating a logical volume: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- 2019-01-29 17:27:37,269 INFO tuned.plugins.hotplug: device 'dm-3' added 2019-01-29 17:27:37,269 INFO tuned.plugins.hotplug: DEVICE TYPE: <type 'unicode'> -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Later, because of the following line, the assertion fails: /usr/lib/python2.7/site-packages/tuned/monitors/base.py: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- def add_device(self, device): assert isinstance(device, str) -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- device.sys_name can probably be converted into a "str", but I'm not completely sure about that: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- def _add_device(self, device): device_name = str(device.sys_name) ... def _remove_device(self, device): device_name = str(device.sys_name) -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------