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.
Bug 1974071 - Unhandled exception from net plugin when a device channel contains n/a
Summary: Unhandled exception from net plugin when a device channel contains n/a
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2021-07-13
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: tuned
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: beta
: ---
Assignee: Jaroslav Škarvada
QA Contact: Robin Hack
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-20 10:53 UTC by Yanir Quinn
Modified: 2021-11-10 10:07 UTC (History)
3 users (show)

Fixed In Version: tuned-2.16.0-0.1.rc1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:58:58 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github redhat-performance tuned pull 360 0 None closed Fix conditional order for setting net device param 2021-06-28 09:14:53 UTC
Red Hat Product Errata RHBA-2021:4476 0 None None None 2021-11-09 19:59:11 UTC

Description Yanir Quinn 2021-06-20 10:53:20 UTC
Description of problem:
When the net plugin is set to scan devices and apply net queues configuration
it can throw an unhandeld exception if the device has a combined channel with the n/a value. 


Version-Release number of selected component (if applicable):
OCP: 4.8.0-fc.9
CoreOS 8.4 GA
kernel-core 4.18.0 305.3.1.el8_4

How reproducible:
Always

Steps to Reproduce:
1. on an environment that has a non virtual net device
create a tuned profile with net plugin set:

[net]
channels=combined 1
2. apply the profile

Actual results:
An unhandled exception is thrown:

2021-06-16 13:30:21,578 ERROR    tuned.units.manager: BUG: Unhandled exception in start_tuning: invalid literal for int() with base 10: 'n/a'
2021-06-16 13:30:21,578 ERROR    tuned.units.manager: Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call
    return f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 78, in apply_tuning
    self._plugin.instance_apply_tuning(self)
  File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning
    self._instance_apply_static(instance)
  File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 318, in _instance_apply_static
    self._execute_all_device_commands(instance, instance.assigned_devices)
  File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 441, in _execute_all_device_commands
    self._execute_device_command(instance, command, device, new_value)
  File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 502, in _execute_device_command
    command["custom"](True, new_value, device, False, False)
  File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_net.py", line 468, in _channels
    return self._custom_parameters("channels", start, value, device, verify)
  File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_net.py", line 423, in _custom_parameters
    dev_params = params_current)
  File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_net.py", line 400, in _set_device_parameters
    if context == "channels" and (int(dev_params[next(iter(d))]) == 0 or str(dev_params[next(iter(d))]) == 'n/a'):
ValueError: invalid literal for int() with base 10: 'n/a'

Expected results:
Setting the net device channel to the required value should either dismissed with a warning (if not supported for multi channels) or be set to the desired value.

Additional info:
Getting available devices on the machine example:

find /sys/class/net -type l -not -lname *virtual* -printf '%f\n'
eno3
eno1
ens1f0
eno4
eno2
ens1f1

a net device with n/a value for the channel:

# ethtool -l eno2
Channel parameters for eno2:
Pre-set maximums:
RX:		4
TX:		4
Other:		n/a
Combined:	n/a
Current hardware settings:
RX:		4
TX:		1
Other:		n/a
Combined:	n/a

Comment 1 Yanir Quinn 2021-06-20 10:55:24 UTC
Suggested fix added here: https://github.com/redhat-performance/tuned/pull/360

Comment 2 Yanir Quinn 2021-06-28 09:14:24 UTC
https://github.com/redhat-performance/tuned/pull/360  merged

Comment 9 errata-xmlrpc 2021-11-09 19:58:58 UTC
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 (tuned bug fix and enhancement update), 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-2021:4476


Note You need to log in before you can comment on or make changes to this bug.