Bug 845826

Summary: firewall_auto breaks progress bar in autoinstall mode
Product: [openSUSE] openSUSE 13.1 Reporter: Thomas Fehr <fehr>
Component: YaST2Assignee: Josef Reidinger <jreidinger>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None CC: jreidinger, locilka, mfilka
Version: RC 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2log file of autoyast installation
autoyast profile

Description Thomas Fehr 2013-10-14 16:56:17 UTC
When an autoyast xml profile contains a section <firewall> </firewall>
inst_autoconfigure calls firewall_auto with "Write".

there is following code in firewall_auto.rb

      elsif @func == "Write"
        Yast.import "Progress"
        Progress.off
        @ret = SuSEFirewall.Write
        Progress.on
      else

There is an ruby exception in y2log file:

013-10-14 15:40:39 <2> f74(4235) [Ruby] modules/Progress.rb:308 /usr/share/YaST2/modules/Progress.rb:308:in `on'
2013-10-14 15:40:39 <2> f74(4235) [Ruby] modules/Progress.rb:308 /usr/share/YaST2/clients/firewall_auto.rb:111:in `main'
2013-10-14 15:40:39 <2> f74(4235) [Ruby] modules/Progress.rb:308 /usr/share/YaST2/clients/firewall_auto.rb:128:in `<top (required)>'
2013-10-14 15:40:39 <2> f74(4235) [Ruby] modules/Progress.rb:308 /usr/lib/ruby/vendor_ruby/2.0.0/yast/wfm.rb:84:in `eval'
2013-10-14 15:40:39 <2> f74(4235) [Ruby] modules/Progress.rb:308 /usr/lib/ruby/vendor_ruby/2.0.0/yast/wfm.rb:84:in `run_client'
2013-10-14 15:40:39 <2> f74(4235) [Ruby] modules/Progress.rb:308 /usr/lib/ruby/vendor_ruby/2.0.0/yast/wfm.rb:77:in `call_builtin'
2013-10-14 15:40:39 <2> f74(4235) [Ruby] modules/Progress.rb:308 /usr/lib/ruby/vendor_ruby/2.0.0/yast/wfm.rb:77:in `call_builtin_wrapper'
2013-10-14 15:40:39 <2> f74(4235) [Ruby] modules/Progress.rb:308 /usr/lib/ruby/vendor_ruby/2.0.0/yast/wfm.rb:71:in `CallFunction'
2013-10-14 15:40:39 <2> f74(4235) [Ruby] modules/Progress.rb:308 /usr/share/YaST2/modules/Call.rb:45:in `Function'
2013-10-14 15:40:39 <2> f74(4235) [Ruby] modules/Progress.rb:308 /usr/share/YaST2/clients/inst_autoconfigure.rb:192:in `block in main'

Unfortunately this results in a indefinite hang of the next call to
UI.ChangeWidget(Id(:progress), :Value, @current_step) in inst_autoconfigure.rb

I am not sure but it might be the case that the hang only occurs with qt UI.
I will attach complete y2log file.
Will attach y2log file and autoyast profile

Lukas assigning to you since yast-firewall does not have a maintainer.
Please reassign accordingly.
Comment 1 Thomas Fehr 2013-10-14 16:57:06 UTC
Created attachment 563366 [details]
y2log file of autoyast installation
Comment 2 Thomas Fehr 2013-10-14 16:57:46 UTC
Created attachment 563368 [details]
autoyast profile
Comment 3 Michal Filka 2013-10-17 12:05:41 UTC
I've just learned that the backtrace is not ruby exception but feature of y2warning( -1, ...) call which is issued in Progress#on
Comment 4 Michal Filka 2013-10-17 12:07:51 UTC
Anyway, according this line

clients/firewall_auto.rb:118 Firewall auto finished

firewall is done, so problem is probably somewhere out there.
Comment 5 Thomas Fehr 2013-10-17 12:28:07 UTC
Please discuss with maintainer of Progress.rb if what firewall
code does or Progress bar code is wrong. 

What would you suggest autoyast could to against that?
Autoyast not calling firewall_auto.rb any more would certainly
help but is unfortunately not an option.

BTW: When I comment Progress::on and Progress::off out 
from firewall module the problem does not appear.
Comment 6 Josef Reidinger 2014-11-10 14:32:12 UTC
fix is in review https://github.com/yast/yast-firewall/pull/15
Comment 7 Michal Filka 2014-11-10 17:10:44 UTC
reviewed

@Josef:
thanks for taking over.
Comment 8 Josef Reidinger 2014-11-11 06:10:15 UTC
thanks, lets close it