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.

Bug 1643944

Summary: fix tuned assertion error
Product: Red Hat Enterprise Linux 7 Reporter: jianzzha
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 7.5CC: jeder, jraju, jskarvad, olysonek
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 07:25:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jianzzha 2018-10-29 13:53:19 UTC
Description of problem:
This is a follow up on the closed BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1432240

The current situation is: when applying cpu-partitioning profile, there is still a misleading assertion error. See the detail of this assertion error we recently came across in another BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1432240, see comment2 for the reproduce of this assertion error.

This is quite annoying and misleading and we need to fix that.

Here is what I think the cause of this assertion error: in https://github.com/redhat-performance/tuned/blob/master/tuned/profiles/functions/function_assertion.py

the strings used for the compare on line 22 are not sorted list, say the left could be "1,3,5" and the right could be "3,5,1", even though they are the same but that if statement may end false.  To fix it, they need to be sorted, so if change the if statement on line 22 to:
 if ''.join(sorted(args[1].split(','))) != ''.join(sorted(args[1].split(','))):
 
that should solve the assertion issue.


Version-Release number of selected component (if applicable):
tuned-2.9.0-1.el7_5.2.noarch
tuned-profiles-cpu-partitioning-2.9.0-1.el7_5.2.noarch


How reproducible:
random. depends on the system.

Steps to Reproduce:
1. edit cpu-partitioning-variables.conf
# Examples:
# isolated_cores=2,4-7
isolated_cores=1,3,5,7,9

2. tuned-adm profile cpu-partitioning
Cannot load profile(s) 'cpu-partitioning': Assertion 'isolated_cores contains online CPU(s)' failed.

Actual results:
assertion error

Expected results:
no error

Additional info:

Comment 2 jianzzha 2018-10-29 13:56:56 UTC
There is a typo in the description. The other BZ referred above should be:
https://bugzilla.redhat.com/show_bug.cgi?id=1642209

see comment 2 in this BZ.

Comment 3 Ondřej Lysoněk 2019-05-09 08:55:39 UTC
Sorry for the late reply, it seems this bug fell through the cracks... I think the problem you're describing is the same as the one recently reported here: bug#1706171. There's a patch, could you try it out?

Comment 4 jianzzha 2019-05-13 17:47:32 UTC
yeah that appears to fix it

Comment 5 Ondřej Lysoněk 2019-05-14 07:25:44 UTC
OK, thanks! Let's close this one as a dupe.

*** This bug has been marked as a duplicate of bug 1706171 ***