agent fails to detect active firewalld.service on Fedora 40 #2
Labels
bug
Something isn't working
c:agent-rust (>=3.0)
Related to agent writen in Rust, so since version 3.0
Milestone
Title says it all and possibly affects everyone with similar systemd versions.
.../Inventory/Generic/Firewall/Systemd.pm
runssystemctl status firewalld.service
and matches with this regexp:/^\s*Loaded: loaded [^;]+firewalld[^;]*; [^;]*;[^\n]*\n\s*Active: active \(running\)/
Over here (Fedora Linux 40 with systemd-255.10 and firewalld-2.1.3), the status output is the following:
My limited regexp fu seems to tell me that the expression expects "Loaded" and "Active" lines to be consecutive (while they are not). My limitations keep me from submitting a better regexp, though. Maybe we want check for those two lines with two regexps?
Alternatively,
firewall-cmd --state
might give the best check (to the extent that this just as the above says nothing about the config being tight, of course).The text was updated successfully, but these errors were encountered: