Bug 2115230

Summary: irqbalance.service: Unknown lvalue 'ConditionCPUs' in section 'Unit'
Product: Red Hat Enterprise Linux 8 Reporter: xiachen
Component: irqbalanceAssignee: ltao
Status: CLOSED ERRATA QA Contact: Jiri Dluhos <jdluhos>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.7CC: ccheney, dennis.e.stout, h1k6zn2m, huzhao, jbastian, jdluhos, jeder, jshortt, ltao, orion, pb, peter.vreman, ruyang, stefano.biagiotti, third.line, tmajumde, vchepkov, xiachen, xiliang
Target Milestone: rcKeywords: CustomerScenariosInitiative, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: irqbalance-1.9.0-4.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-16 09:11:27 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:
Bug Depends On:    
Bug Blocks: 2159612    

Description xiachen 2022-08-04 08:01:24 UTC
Description of problem:
sudo systemd-analyze verify irqbalance.service
/usr/lib/systemd/system/irqbalance.service:6: Unknown lvalue 'ConditionCPUs' in section 'Unit'

Version-Release number of selected component (if applicable):
irqbalance-1.9.0-3.el8.x86_64


cat /usr/lib/systemd/system/irqbalance.service
[Unit]
Description=irqbalance daemon
Documentation=man:irqbalance(1)
Documentation=https://github.com/Irqbalance/irqbalance
ConditionVirtualization=!container
ConditionCPUs=>1

[Service]
EnvironmentFile=-/usr/lib/irqbalance/defaults.env
EnvironmentFile=-/etc/sysconfig/irqbalance
ExecStart=/usr/sbin/irqbalance --foreground $IRQBALANCE_ARGS
ReadOnlyPaths=/
ReadWritePaths=/proc/irq
RestrictAddressFamilies=AF_UNIX
RuntimeDirectory=irqbalance/

[Install]
WantedBy=multi-user.target



Additional info:

ConditionCPUs came in with SystemD version 242.
https://github.com/systemd/systemd/blob/main/NEWS#L3941

but in the VM created with rhel-guest-image-8.7-1176.qcow2,
systemctl --version systemd
systemd 239 (239-62.el8)
...

please help to check and fix it.

Comment 1 ltao 2022-12-08 03:20:53 UTC
Hi Jiri,

Could you please set qa_ack flags for this bug? Thanks!
 
Thanks,
Tao Liu

Comment 2 Jiri Dluhos 2022-12-08 08:13:23 UTC
Sure! Done!

Comment 3 Jiri Dluhos 2023-01-06 20:31:14 UTC
Confirming that the bug indeed occurs with irqbalance-1.9.0-3, and is fixed in irqbalance-1.9.0-4 ("systemd analyze" does not report the error anymore; from /usr/lib/systemd/system/irqbalance.service I can see that the offending line was removed which probably a good solution for the time being [until new systemd is integrated]).
Thanks to everyone involved!

Comment 5 Renaud Métrich 2023-01-11 07:23:11 UTC
*** Bug 2144462 has been marked as a duplicate of this bug. ***

Comment 13 Dennis Stout 2023-03-16 20:15:36 UTC
Removing the line entirely does get rid of the error, but changing the line from

ConditionCPUs=>1

to

ConditionCPUs>=2

is probably the better fix.  This allows the service to rebalance IRQs between CPUs where there is more than one CPU present, but doesn't bother running the service when there is only one CPU.  Not really a performance enhancement, but it probably stays in-line with the original intent of the configuration.

Comment 14 ltao 2023-03-20 01:43:26 UTC
(In reply to Dennis Stout from comment #13)
> Removing the line entirely does get rid of the error, but changing the line
> from
> 
> ConditionCPUs=>1
> 
> to
> 
> ConditionCPUs>=2
> 
> is probably the better fix.  This allows the service to rebalance IRQs
> between CPUs where there is more than one CPU present, but doesn't bother
> running the service when there is only one CPU.  Not really a performance
> enhancement, but it probably stays in-line with the original intent of the
> configuration.

Hi Dennis,

Thanks for your comments! The systemd version which used currently in rhel8 is systemd-239-74.el8_8.x86_64.rpm, however according to [1], the ConditionCPUs is only available after 242. So I think no matter ConditionCPUs>=?, the variable will not take effect and the same warning "Unknown lvalue 'ConditionCPUs'" will always be outputted.

Thanks,
Tao Liu

[1]: https://github.com/systemd/systemd/blob/main/NEWS#L3941

Comment 15 Peter Bieringer 2023-04-23 16:43:58 UTC
when will be " irqbalance-1.9.0-4" available? At least on AlmaLinux 8 it's still irqbalance-1.9.0-3 as of 2023-04-23

Comment 16 ltao 2023-04-24 02:12:00 UTC
(In reply to Peter Bieringer from comment #15)
> when will be " irqbalance-1.9.0-4" available? At least on AlmaLinux 8 it's
> still irqbalance-1.9.0-3 as of 2023-04-23

Hi Peter,

Thanks for your comments. irqbalance-1.9.0-4 is in rhel8.8, however I see AlmaLinux 8, it is equivalent to rhel8.7, which the new irqbalance release is not targeted on. The package should be available when rhel8.8 is released.

Thanks,
Tao Liu

Comment 18 errata-xmlrpc 2023-05-16 09:11:27 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 (irqbalance 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-2023:3035