-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
Description
The firewalld integration for libnetwork currently probes for whether firewalld is running by testing whether the org.fedoraproject.FirewallD1.getDefaultZone D-Bus method can be called without error. While effective, it is technically abusing the interface to infer the state of firewalld from whether or not it is able to service D-Bus RPC calls.
In addition to its own bespoke interfaces, firewalld exposes several properties through the standard D-Bus property interface. Notably, the state property signals whether firewalld is starting up, operational or failed (in an error state but still servicing D-Bus requests). We should switch to getting the state property, and do something sensible when the state is INIT or FAILED. Perhaps we could even subscribe to org.freedesktop.DBus.Properties.PropertiesChanged signals for the property and react to INIT -> RUNNING transitions instead of polling.