Bug 1110880 - libvirtd causes errors in firewalld logs
Summary: libvirtd causes errors in firewalld logs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: firewalld
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-18 16:39 UTC by Adam Miller
Modified: 2016-08-16 21:02 UTC (History)
14 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-08-16 21:02:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Adam Miller 2014-06-18 16:39:19 UTC
Description of problem:

Jun 18 11:10:23 carbon systemd[1]: Starting firewalld - dynamic firewall daemon...
Jun 18 11:10:23 carbon systemd[1]: Started firewalld - dynamic firewall daemon.
Jun 18 11:10:40 carbon firewalld[2470]: 2014-06-18 11:10:40 ERROR: COMMAND_FAILED: '/sbin/iptables --table nat --delete POSTROUTING --source 192.168.122.0/24 --destination 224.0.0.0/24 --jump RETURN' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Jun 18 11:10:40 carbon firewalld[2470]: 2014-06-18 11:10:40 ERROR: COMMAND_FAILED: '/sbin/iptables --table nat --delete POSTROUTING --source 192.168.122.0/24 --destination 255.255.255.255/32 --jump RETURN' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Jun 18 11:10:40 carbon firewalld[2470]: 2014-06-18 11:10:40 ERROR: COMMAND_FAILED: '/sbin/iptables --table nat --delete POSTROUTING --source 192.168.122.0/24 -p tcp ! --destination 192.168.122.0/24 --jump MASQUERADE --to-ports 1024-65535' failed: iptables: No chain/target/match by that name.
Jun 18 11:10:40 carbon firewalld[2470]: 2014-06-18 11:10:40 ERROR: COMMAND_FAILED: '/sbin/iptables --table nat --delete POSTROUTING --source 192.168.122.0/24 -p udp ! --destination 192.168.122.0/24 --jump MASQUERADE --to-ports 1024-65535' failed: iptables: No chain/target/match by that name.
Jun 18 11:10:40 carbon firewalld[2470]: 2014-06-18 11:10:40 ERROR: COMMAND_FAILED: '/sbin/iptables --table nat --delete POSTROUTING --source 192.168.122.0/24 ! --destination 192.168.122.0/24 --jump MASQUERADE' failed: iptables: No chain/target/match by that name.
Jun 18 11:10:40 carbon firewalld[2470]: 2014-06-18 11:10:40 ERROR: COMMAND_FAILED: '/sbin/iptables --table filter --delete FORWARD --destination 192.168.122.0/24 --out-interface virbr0 --match conntrack --ctstate ESTABLISHED,RELATED --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Jun 18 11:10:41 carbon firewalld[2470]: 2014-06-18 11:10:41 ERROR: COMMAND_FAILED: '/sbin/iptables --table filter --delete FORWARD --source 192.168.122.0/24 --in-interface virbr0 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Jun 18 11:10:41 carbon firewalld[2470]: 2014-06-18 11:10:41 ERROR: COMMAND_FAILED: '/sbin/iptables --table filter --delete FORWARD --in-interface virbr0 --out-interface virbr0 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Jun 18 11:10:41 carbon firewalld[2470]: 2014-06-18 11:10:41 ERROR: COMMAND_FAILED: '/sbin/iptables --table filter --delete FORWARD --out-interface virbr0 --jump REJECT' failed: iptables: No chain/target/match by that name.
Jun 18 11:10:41 carbon firewalld[2470]: 2014-06-18 11:10:41 ERROR: COMMAND_FAILED: '/sbin/iptables --table filter --delete FORWARD --in-interface virbr0 --jump REJECT' failed: iptables: No chain/target/match by that name.
Jun 18 11:10:41 carbon firewalld[2470]: 2014-06-18 11:10:41 ERROR: COMMAND_FAILED: '/sbin/iptables --table filter --delete INPUT --in-interface virbr0 --protocol udp --destination-port 53 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Jun 18 11:10:42 carbon firewalld[2470]: 2014-06-18 11:10:42 ERROR: COMMAND_FAILED: '/sbin/iptables --table filter --delete INPUT --in-interface virbr0 --protocol tcp --destination-port 53 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Jun 18 11:10:42 carbon firewalld[2470]: 2014-06-18 11:10:42 ERROR: COMMAND_FAILED: '/sbin/iptables --table mangle --delete POSTROUTING --out-interface virbr0 --protocol udp --destination-port 68 --jump CHECKSUM --checksum-fill' failed: iptables: No chain/target/match by that name.
Jun 18 11:10:42 carbon firewalld[2470]: 2014-06-18 11:10:42 ERROR: COMMAND_FAILED: '/sbin/iptables --table filter --delete INPUT --in-interface virbr0 --protocol udp --destination-port 67 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Jun 18 11:10:42 carbon firewalld[2470]: 2014-06-18 11:10:42 ERROR: COMMAND_FAILED: '/sbin/iptables --table filter --delete INPUT --in-interface virbr0 --protocol tcp --destination-port 67 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).

Version-Release number of selected component (if applicable):
libvirt-daemon-1.1.3.5-2.fc20.x86_64
firewalld-0.3.9.3-1.fc20.noarch

How reproducible:
Always

Steps to Reproduce:
1. journalctl -u firewalld -f -l # In a different terminal
2. systemctl stop libvirtd
3. systemctl stop firewalld
4. systemctl start firewalld
5. systemctl start libvirtd # You will see errors from the journal "tail"

Additional info:
It appears that libvirtd is injecting (or trying to inject) rules that already exist.

Comment 1 Daniel Berrangé 2014-06-18 16:52:53 UTC
At certain times libvirt needs to ensure that there's no cruft left over in firewall rules from a previous potentially-failed libvirt operation. It will thus attempt to delete any rules it thinks it might have previously created. It is entirely expected that these rules will not necessarily exist and so iptables will fail to delete them. Libvirt has sufficient logic to decide whether the failure of iptables is actually an error or not.

So firewalld is wrong to assume that a failing iptables command like this is an error - only the client user/application using firewalld has enough context of use to know whether this is a fatal error or not. As such, firewalld shouldn't logs these as "errors".

Comment 2 Fedora End Of Life 2015-05-29 12:09:12 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Fedora End Of Life 2015-06-29 21:11:50 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 4 Jonathan Underwood 2016-03-10 20:34:39 UTC
Still present in F23 - while I see it's not a bug from the libvirt point of view, seeing these errors on simply doing a systemctl restart firewalld is alarming to the untrained eye.

Comment 5 Thomas Woerner 2016-04-07 13:59:11 UTC
Fixed upstream: https://github.com/t-woerner/firewalld/commit/f47fe3989f6935bd0eddb79bdf8c07225115f5bd

The errors are now reported as warnings only.

Comment 6 Thomas Woerner 2016-08-16 21:02:04 UTC
Fixed in firewalld-0.4.1.2 in Fedora 23 and up.


Note You need to log in before you can comment on or make changes to this bug.