]> xenbits.xensource.com Git - libvirt.git/commit
network: only reload firewall after firewalld is finished restarting
authorLaine Stump <laine@laine.org>
Fri, 12 Apr 2019 15:23:02 +0000 (11:23 -0400)
committerLaine Stump <laine@laine.org>
Mon, 15 Apr 2019 16:53:38 +0000 (12:53 -0400)
commitfc79e73836cef55b6a3af29d79ac3a34adce84b7
tree7aab5724391acf0d914f70248b8067c7c6dd7a39
parent687f5567509a50ebaabe6bb534b9f65fcf54cfc1
network: only reload firewall after firewalld is finished restarting

The network driver used to reload the firewall rules whenever a dbus
NameOwnerChanged message for org.fedoraproject.FirewallD1 was
received. Presumably at some point in the past this was successful at
reloading our rules after a firewalld restart. Recently though I
noticed that once firewalld was restarted, libvirt's logs would get this
message:

  The name org.fedoraproject.FirewallD1 was not provided by any .service files

After this point, no networks could be started until libvirtd itself
was restarted.

The problem is that the NameOwnerChanged message is sent twice during
a firewalld restart - once when the old firewalld is stopped, and
again when the new firewalld is started. If we try to reload at the
point the old firewalld is stopped, none of the firewalld dbus calls
will succeed.

The solution is to check the new_owner field of the message - we
should reload our firewall rules only if new_owner is non-empty (it is
set to "" when firewalld is stopped, and some sort of epoch number
when it is again started).

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/network/bridge_driver.c