Bug 1297460

Summary: adding same source to different zones leads to UNKNOWN_ERROR
Product: [Fedora] Fedora Reporter: Tomas Dolezal <todoleza>
Component: firewalldAssignee: Thomas Woerner <twoerner>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: high    
Version: 23CC: jpopelka, twoerner, vdanek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: firewalld-0.4.0-2.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-21 16:30:36 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:

Description Tomas Dolezal 2016-01-11 15:13:32 UTC
Description of problem:
error coming out of binding a source ip to different zones is different on fedora 23 than on rhel7. that's probably due to python3.x (see in DEBUG copied to additional info).
additionally, this check is not present in developer testsuite (https://github.com/t-woerner/firewalld/commit/a5965e7c44eb94d5063cf95f89f350f3c28619f0)

Version-Release number of selected component (if applicable):
firewalld-0.3.14.2-4.fc23.noarch

How reproducible:
always

Steps to Reproduce:
use --add-source with same ip on two zones:
firewall-cmd --zone=trusted --add-source=192.168.0.1
firewall-cmd --zone=block --add-source=192.168.0.1

Actual results:
[root@vm-f23 ~]# firewall-cmd --zone=block --add-source=192.168.0.1
Error: not all arguments converted during string formatting
and exitcode: 254 (UNKNOWN_ERROR)

Expected results:
Error: ZONE_CONFLICT
exit code: 18

Additional info:
2016-01-11 15:58:45 DEBUG1: Setting zone of interface 'ens3' to 'FedoraWorkstation'
2016-01-11 15:58:45 DEBUG1: zone.ZoneOfInterfaceChanged('FedoraWorkstation', 'ens3')
2016-01-11 15:58:45 DEBUG1: zone.ZoneChanged('FedoraWorkstation', 'ens3')
2016-01-11 15:58:46 DEBUG1: zone.addSource('trusted', '192.168.0.1')
2016-01-11 15:58:47 DEBUG1: zone.SourceAdded('trusted', '192.168.0.1')
2016-01-11 15:58:49 DEBUG1: zone.addSource('block', '192.168.0.1')
2016-01-11 15:58:49 Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/firewall/server/decorators.py", line 57, in dbus_handle_exceptions
    return func(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/firewall/server/firewalld.py", line 1018, in addSource
    _zone = self.fw.zone.add_source(zone, source, sender)
  File "/usr/lib/python3.4/site-packages/firewall/core/fw_zone.py", line 642, in add_source
    "'%s' already bound to a zone" % source_id)
TypeError: not all arguments converted during string formatting

Comment 4 Fedora Update System 2016-02-04 15:40:52 UTC
firewalld-0.4.0-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-fc0691e6a7

Comment 5 Fedora Update System 2016-02-05 01:23:29 UTC
firewalld-0.4.0-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-fc0691e6a7

Comment 6 Fedora Update System 2016-02-08 13:28:41 UTC
firewalld-0.4.0-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-fc0691e6a7

Comment 7 Fedora Update System 2016-02-09 22:27:40 UTC
firewalld-0.4.0-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-fc0691e6a7

Comment 8 Fedora Update System 2016-02-21 16:30:09 UTC
firewalld-0.4.0-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.