Bug 1652207

Summary: When manipulating firewall rules the UI will spin endlessly when a filter is applied but no rule is selected
Product: Red Hat Enterprise Linux 8 Reporter: Sterling Alexander <stalexan>
Component: cockpitAssignee: Martin Pitt <mpitt>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Ščotka <jscotka>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.0CC: ptalbert
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-23 11:53:19 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:
Embargoed:

Description Sterling Alexander 2018-11-21 16:45:04 UTC
Description of problem:  Cockpit webUI will spin endlessly when filtering for a rule and clicking "Add Service" but not selecting a filtered service to add.  This will prevent any firewall rule manipulation via cockpit until the service is restarted vai:

systemctl restart cockpit.service

Even attempting to turn the firewall off/on will not reset the spinning UI


Version-Release number of selected component (if applicable): 8.0 (theOcho) beta


How reproducible: 100% of the time, every time


Steps to Reproduce:
1.  Enable cockpit socket
2.  Log in and open http://localhost:9090/network/firewall
3.  Filter for any firewall rule (steam is a good one.)
4.  Click "Add Service" without selecting a service to add
5.  Watch the UI spin


Actual results:  Firewall rule UI is blocked, spinning.  Unable to modify firewall rules via cockpit without restarting cockpit service


Expected results:  The UI would continue to function if the user clicks without selecting a service to enable.

Comment 1 Sterling Alexander 2018-11-21 16:48:12 UTC
As an addendum, this will occur without anything in the rule filter.  Simply clicking "Add Service" with no services selected will lock out the UI.

Comment 2 Martin Pitt 2018-11-22 13:37:54 UTC
The JS console shows an "Oops": TypeError: services.map is not a function

You don't really need to restart cockpit.service, reloading the  browser page is enough.

I'll work on a fix now, thanks for the report!

Comment 3 Martin Pitt 2018-11-22 14:09:07 UTC
Fix: https://github.com/cockpit-project/cockpit/pull/10642