Bug 1309754 - firewall-offline-cmd aborts if a service is already enabled
Summary: firewall-offline-cmd aborts if a service is already enabled
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: firewalld
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker
Depends On:
Blocks: F24AlphaBlocker
TreeView+ depends on / blocked
 
Reported: 2016-02-18 15:44 UTC by David Shea
Modified: 2016-03-08 19:07 UTC (History)
6 users (show)

Fixed In Version: firewalld-0.4.0-4.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-08 19:07:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description David Shea 2016-02-18 15:44:07 UTC
Description of problem:

From https://github.com/t-woerner/firewalld/issues/82

If I run this command in anaconda:

08:14:06,197 INFO program: Running... /usr/bin/firewall-offline-cmd --enabled --service=ssh --port=22001:tcp --port=6400:udp --service=tftp --service=smtp

Then firewall-offline-cmd gives me the following:

08:14:06,874 INFO program: Adding service 'ssh' to default zone.
08:14:06,874 INFO program: ALREADY_ENABLED: ssh
08:14:06,875 DEBUG program: Return code: 2

And doesn't appear to have done anything about the --port or --service options given. It'd be nicer if the already enabled service didn't cause the program to abort. I believe this is how it behaved up until the latest version.

This is caused by 14fecd41eb6be610179ff6e1b2534dd6171628be which enables the ALREADY/NOT_ENABLED exceptions which were previously unused in the CLI, and which it makes it impossible to apply firewall settings without adding a lot of logic external to the actual firewall command.

Version-Release number of selected component (if applicable):
firewalld-0.4.0-3.fc24.noarch

Comment 1 Fedora Blocker Bugs Application 2016-02-18 15:45:52 UTC
Proposed as a Blocker for 24-alpha by Fedora user dshea using the blocker tracking app because:

 Per the firewall configuration criteria (https://fedoraproject.org/wiki/Fedora_24_Alpha_Release_Criteria#Firewall_configuration): "t is possible to include firewall configuration options in a kickstart-driven installation, and the criterion requires that those options work as expected." Changes in the behavior of firewall-offline-cmd has made those options not work as expected.

Comment 2 Jiri Popelka 2016-02-22 18:14:44 UTC
(In reply to David Shea from comment #0)
> This is caused by 14fecd41eb ...

Thanks.

I'm afraid Thomas might appear after 24 alpha freeze, so the easiest for now would be to just revert that commit and wait for him to fix it his own way.

Please check firewalld-0.4.0-4.fc24

Comment 3 Petr Schindler 2016-02-22 19:24:17 UTC
Discussed at 2016-02-22 blocker review meeting: [1]. 

This bug was accepted as Alpha blocker: clear violation of "...Supported install-time firewall configuration options must work correctly.", with the footnote that kickstart-specified options are covered

[1] http://meetbot.fedoraproject.org/fedora-blocker-review/2016-02-22/f24-blocker-review.2016-02-22-17.00.html

Comment 4 Petr Schindler 2016-02-22 19:25:16 UTC
sorry, collision

Comment 5 Jan Kurik 2016-02-24 15:26:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 6 Adam Williamson 2016-03-08 19:07:03 UTC
the upstream issue remains, but this is fixed from a Fedora (and particularly Fedora release blocker) perspective, so closing. A proper upstream fix can be tracked via the github issue.


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