Bug 1309754 - firewall-offline-cmd aborts if a service is already enabled
firewall-offline-cmd aborts if a service is already enabled
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: firewalld (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Thomas Woerner
Fedora Extras Quality Assurance
AcceptedBlocker
:
Depends On:
Blocks: F24AlphaBlocker
  Show dependency treegraph
 
Reported: 2016-02-18 10:44 EST by David Shea
Modified: 2016-03-08 14:07 EST (History)
6 users (show)

See Also:
Fixed In Version: firewalld-0.4.0-4.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-08 14:07:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Shea 2016-02-18 10:44:07 EST
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 10:45:52 EST
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 13:14:44 EST
(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 14:24:17 EST
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 14:25:16 EST
sorry, collision
Comment 5 Jan Kurik 2016-02-24 10:26:02 EST
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 14:07:03 EST
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.