Bug 779455

Summary: Yast "Stop Firewall Now" Button Broken
Product: [openSUSE] openSUSE 12.2 Reporter: Forgotten User vueNW_1Osb <forgotten_vueNW_1Osb>
Component: YaST2Assignee: Lukas Ocilka <locilka>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P3 - Medium CC: bill_wayson, bjwest, comes, eliaschr_mh_corp, forgotten_--EoyBps8f, javier, maintenance, malcolmlewis, meissner, tgoettlicher
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 12.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Forgotten User vueNW_1Osb 2012-09-10 01:48:48 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0

In Yast on OpenSuse 12.2, under Firewall.  Pressing button "Stop Firewall Now" does nothing.  Firewall keeps running, no change in appearance of buttons (would expect button to gray out when firewall stops).

This condition exists on two different computers, one of which started with 12.2 RC2 and was upgraded.  Not sure when this started; might have been when configuring Samba and allowed services on firewall.  Can't think of any reason that would mean firewall stuck on.

Reproducible: Always

Steps to Reproduce:
1.  Start Yast
2.  Open "Firewall" to configure
3.  Press "Stop Firewall Now" Button
4.  Dialog buttons flash but do not deactivate firewall
Actual Results:  
Firewall continues running

Expected Results:  
Firewall stops running, "Stop Firewall Now" button should gray out, other button should be active.

This is happening on both computers I am running with OpenSuse 12.2.
Comment 1 Bill Wayson 2012-09-10 17:08:15 UTC
I had this same issue after installing 12.2 i586 on one notebook PC on 9/9/2012.  The Yast2 Firewall module did not appear to stop the firewall.  I tried stopping the firewall from the Yast2 Runlevel and System Services module, but even though that returned success, the iptables -L command showed that firewall rules were still loaded.  I re-enabled the firewall services so that the firewall would come up when the PC booted.  I then ran, from a terminal as root, /etc/init.d/SuSEfirewall2_setup stop and /etc/init.d/SuSEfirewall2_init stop.  A subsequent run of iptables -L showed that no firewall rules were loaded.  I then rebooted to try to return the PC to a known-good state.  Now, the Yast2 firewall module shows that the firewall is not running, and pressing the "Start firewall now" button appears to do nothing.  (The Stop button is greyed out.)  Running iptables -L shows that firewall rules are loaded, and running /etc/init.d/SuSEfirewall2_setup start (or stop) and /etc/init.d/SuSEfirewall2_init start (or stop) now does nothing to change whether or not firewall rules are loaded.  So I have probably botched things up on top of a basic bug in the Yast2 Firewall module:  the Stop and Start Firewall Now buttons appear to do nothing.  I am okay with just reinstalling 12.2 on this notebook PC, so I expect no troubleshooting of the botching I may have done.
Comment 2 Johnny West 2012-09-11 23:45:24 UTC
I have this issue on a new install of 12.2 64-bit.  The "Start Firewall Now" button is broken as well.
Comment 3 Lukas Ocilka 2012-09-24 15:46:51 UTC
Please patch /usr/share/YaST2/modules/SuSEFirewall.ycp file with
this change (script change)

--- a/library/network/src/SuSEFirewall.ycp
+++ b/library/network/src/SuSEFirewall.ycp
@@ -116,7 +116,7 @@
     list <string> firewall_services_reverse = [ "SuSEfirewall2_setup", "SuSEfirewall2_init" ];
 
     /* script for starting and checking firewall status */
-    string firewall_script = "/sbin/SuSEfirewall2";
+    string firewall_script = "/sbin/service SuSEfirewall2_setup";
 
     list <string> SuSEFirewall_variables = [
        // zones and interfaces

and then as root:
  cd /usr/share/YaST2/modules/
  ycpc -c SuSEFirewall.ycp

This should help you
Comment 4 Bill Wayson 2012-09-26 15:41:33 UTC
I patched one PC here at work as instructed and it did work -- thank you _very_ much.  i will try my home notebook this evening and respond if necessary.
Comment 5 Bill Wayson 2012-09-27 03:48:38 UTC
I applied the patch in comment three on two more PCs running openSUSE 12.2, and it worked as expected.  Again, thank you, Lukas, for your help with this.
Comment 6 Lukas Ocilka 2012-09-27 11:08:27 UTC
Thanks for testing, Bill.
Comment 7 Forgotten User vueNW_1Osb 2012-09-28 01:32:49 UTC
Worked for me also.  Thanks!  (The buttons appear to wiggle around a little during the toggle, though)
Comment 8 Elias Chrysoheris 2012-10-03 14:55:03 UTC
Yeap, also worked for me! Thanks man.
Should it be a patch in the updates, so every one could have the new version through Apper or whatever they use to update their system?

Thanks again.
Comment 9 Javier Llorente 2012-10-10 21:29:02 UTC
Is the updated package on its way to be released in the Update repository or is it something to be done? I don't see it on the update-test repository for 12.2.
Comment 10 Javier Llorente 2012-10-10 21:52:06 UTC
Reopening...
Comment 11 Javier Llorente 2012-10-10 21:55:07 UTC
Fix (comment #3) from Lukas submitted (sr #137811)
Comment 12 Benjamin Brunner 2012-10-11 09:38:35 UTC
Thanks for your submission. Could you rename the patch to SuSEfirewall.patch please and mention it in the patchinfo, too. Please see the new guidelines of the review-team: http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines and don't forget to submit it to the devel-project YaST:Head, too if needed. Thanks.
Comment 13 Lukas Ocilka 2012-10-11 10:44:17 UTC
Please cancel the submission, I've changed the patch after some internal
discussion and the code is now here:

    https://github.com/yast/yast-yast2/tree/openSUSE-12_2

Before releasing new yast2.rpm, all changes need to be in git
Comment 14 Lukas Ocilka 2012-10-15 12:41:51 UTC
*** Bug 784246 has been marked as a duplicate of this bug. ***
Comment 15 Lukas Ocilka 2012-10-15 13:38:50 UTC
Package submitted and asked for online update:

--- cut ---
osc submitreq home:locilka:12.2 yast2 openSUSE:12.2:Update
WARNING:
WARNING: Project does not accept submit request, request to open a NEW maintenance incident instead
WARNING:
created request id Request: #138204

  maintenance_incident: home:locilka:12.2/yast2 -> openSUSE:Maintenance (release in openSUSE:12.2:Update)

Message:
- Fixed detection whether firewall is running (BNC #779455) and
  unified with starting and stopping the service via Service API.
- 2.23.4

State:   new        2012-10-15T15:34:04 locilka
--- cut ---
Comment 16 Benjamin Brunner 2012-10-15 14:04:45 UTC
Lukas, the old submission was already canceled. Thanks for the one.
Comment 17 Marcus Meissner 2012-10-16 09:09:42 UTC
And this submission was very bad.

-Requires:       yast2_ui
+Requires:       yui_backend 

This causes zypper to want to change my whole installation from x86_64 to i586.


you seem to have submitted a Factory level yast2 snapshot, not 12.2 level snapshot.

Please resubimit a smaller version.
Comment 18 Lukas Ocilka 2012-10-16 10:19:40 UTC
Thomas, this change(see comment #17) was done by you. Do we already have
all the required packages in build or what could be the problem?

818b09a3 (Thomas Goettlicher  2012-06-20 18:20:06 +0200  24) Requires:       yui_backend

cat /etc/SuSE-release  (shortened)
openSUSE 12.2 (x86_64)

rpm -q yast2
yast2-2.23.3-1.2.1.x86_64

rpm -q --requires yast2 (shortened)
yast2_ui  

See the commit here:
https://github.com/yast/yast-yast2/commit/818b09a3

It was done 4 months ago but openSUSE 12.2 doesn't seem to have
a re-generated spec file in build.
Comment 19 Thomas Göttlicher 2012-10-16 10:36:44 UTC
For 12.2 we have yast2-libyui and yast2 should require yast2_ui. For 12.3 we use (standalone) libyui and yast2 should require yui_backend. 

I checked 12.3 Milestone 0 and it looks okay.
Comment 20 Lukas Ocilka 2012-10-16 10:45:03 UTC
Thomas, but this is 12.2.
Comment 21 Thomas Göttlicher 2012-10-16 11:08:43 UTC
(In reply to comment #20)
> Thomas, but this is 12.2.
I fixed that in the 12.2 branch.
Comment 22 Benjamin Brunner 2012-10-16 11:28:20 UTC
Could you create a new maintenancerequest with the fixed spec file, please? I'll add it to the running update.
Comment 23 Lukas Ocilka 2012-10-16 11:29:53 UTC
I'm working on that...
Comment 24 Lukas Ocilka 2012-10-16 11:37:49 UTC
Submitted with fixed spec file (thanks, Thomas).

created request id Request: #138341
Comment 25 Benjamin Brunner 2012-10-16 12:09:00 UTC
Thanks! Merged the new submission to openSUSE:Maintenance:1009.
Comment 26 Swamp Workflow Management 2012-10-22 12:09:39 UTC
openSUSE-RU-2012:1379-1: An update that has one recommended fix can now be installed.

Category: recommended (low)
Bug References: 779455
CVE References: 
Sources used:
openSUSE 12.2 (src):    yast2-2.23.4-1.7.1