Bug 851769

Summary: YaST Network - bridge br0 config not read properly
Product: [openSUSE] openSUSE 13.1 Reporter: Oldrich Horak <horacius>
Component: YaST2Assignee: Michal Filka <mfilka>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None CC: aspiers, forgotten_O04XDU3xXI, forgotten_QtBI7gWTIh, mpluskal, thardeck, wagner-thomas, wspitz
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 13.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: NetworkInterfaces.patch

Description Oldrich Horak 2013-11-22 08:49:41 UTC
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:25.0) Gecko/20100101 Firefox/25.0

Just after the new installation, the configuration of "br0" not re-read by YaST, a "bridge" without a name appears. The bridge interface cannot be set, the last folder is "hardware" instead of "bridged devices".

If the settings done during installation process, it is well configured, until using of the YaST-network module first time, (then the configuration is damaged if saved even "as is").

Reproducible: Always

Steps to Reproduce:
1. New installation of openSUSE 12.3
2. Install hypervisor for using of XEN (via YaST virtualization module)
3. Open YaST network module to see the network devices and bridge (mis)configuration
Actual Results:  
Network interfaces cannot be edited and configured using YaST network module.

Expected Results:  
Configurable network interfaces using YaST network module.
Comment 1 Ladislav Slezák 2013-11-25 10:01:29 UTC
To the reporter: The steps to reproduce above contain "openSUSE 12.3" while the product attribute is set to "openSUSE 13.1". Which one is correct?

Michal, JFYI: the bridge is created by "lan_proposal" client:
https://github.com/yast/yast-vm/blob/master/src/modules/VM_XEN.rb#L378
Comment 2 Oldrich Horak 2013-11-25 10:59:07 UTC
Sorry for the mistake, the right version is "openSUSE 13.1" in the first step.
Comment 3 Thomas Wagner 2013-12-09 22:02:18 UTC
I experience the same problem with the KVM hypervisor in openSUSE 13.1 (in the initial bug-report XEN was used). With some more details:
* If the bridge is set up with Yast->Install Hypervisor, then I experience the same problems as in the original bugreport.
* If I edit some network related stuff with the Virtual Machine Manager, my previously DHCP-configured devices are set to static without any given IP (visible in Yast->Network). The machine will get itself a 169.xx.xx.xx address. 

* If the bride is set up with Yast->Install Hypervisor the bride is later visible with "ifconfig" and "brctl".
* If the bridge is deleted and set up again with the Virtual Machine Manager, it is not visible with "ifconfig" nor with "brctl"; but it's visible with Yast->Network
Comment 4 Waldemar Spitz 2013-12-10 10:19:40 UTC
The problem is an error in /usr/share/YaST2/modules/NetworkInterfaces.rb.
In case of a bridge, the function GetEthTypeFromSysfs returns the type "bridge", but calling functions expect a "br" device type. Following patch should solve the problem.
Comment 5 Waldemar Spitz 2013-12-10 10:21:31 UTC
Created attachment 571072 [details]
NetworkInterfaces.patch
Comment 6 Tim Hardeck 2013-12-10 10:23:55 UTC
*** Bug 853998 has been marked as a duplicate of this bug. ***
Comment 7 Michal Filka 2013-12-10 12:00:55 UTC
@Waldemar: Thanks for the patch. Its way into main github tree can be tracked here https://github.com/yast/yast-yast2/pull/161
Comment 8 Tim Hardeck 2013-12-11 10:19:13 UTC
*** Bug 846813 has been marked as a duplicate of this bug. ***
Comment 9 Tim Hardeck 2013-12-11 10:21:35 UTC
The suggested fix does also work for me, thanks.
Comment 10 Michal Filka 2013-12-11 10:25:57 UTC
Fixed version was pushed into OBS. Fix is present in yast2.rpm v3.0.11

Thanks all for help
Comment 11 Bernhard Wiedemann 2013-12-12 11:00:22 UTC
This is an autogenerated message for OBS integration:
This bug (851769) was mentioned in
https://build.opensuse.org/request/show/210655 13.1 / yast2
Comment 12 Swamp Workflow Management 2013-12-17 17:05:02 UTC
openSUSE-RU-2013:1902-1: An update that has one recommended fix can now be installed.

Category: recommended (low)
Bug References: 851769
CVE References: 
Sources used:
openSUSE 13.1 (src):    yast2-3.0.11-7.1
Comment 13 Adam Spiers 2014-01-13 13:22:57 UTC
I suspect that this fix might not sufficient.  Does it assume that all bridge devices begin with "br"?  If so, please reopen, because that is not correct:

Here I have an openvswitch bridge called "crowbar-br0", and with yast2-3.0.11-7.1 on 13.1, if I launch the firewall module, I can change the zone on br0 fine but if I attempt to change the zone on crowbar-br0 then I get the error dialog:

     UI Syntax Error

  Invalid arguments for the Label widget

      Check the log file!

And y2log contains:

2014-01-13 13:21:02 <3> indian.linksys.moosehall(30549) [Ruby] modules/NetworkInterfaces.rb:1468 No such device: crowbar-br0
2014-01-13 13:21:02 <1> indian.linksys.moosehall(30549) [Ruby] yast/ops.rb:62 Index 0 is out of array size
2014-01-13 13:21:09 <1> indian.linksys.moosehall(30549) [Ruby] yast/ops.rb:62 Index 0 is out of array size
2014-01-13 13:21:09 <3> indian.linksys.moosehall(30549) [libycp] firewall/uifunctions.rb:303 Invalid arguments for the Label widget: `Label (nil)
2014-01-13 13:21:09 <2> indian.linksys.moosehall(30549) [ui] YCPDialogParser.cc(parseLabel):1213        THROW:    Invalid arguments for the Label widget
2014-01-13 13:21:09 <2> indian.linksys.moosehall(30549) [ui] YCP_UI.cc(OpenDialog):585  CAUGHT:   Invalid arguments for the Label widget
2014-01-13 13:21:09 <3> indian.linksys.moosehall(30549) [libycp] firewall/uifunctions.rb:303 UI::OpenDialog() failed
2014-01-13 13:21:09 <1> indian.linksys.moosehall(30549) [ui] YPushButton.cc(setFunctionKey):188 Guessing button role YOKButton for YPushButton "Close" at 0x7f53583df860 from function key F10

which looks very similar to the issue described with the firewall module in bug 853998.
Comment 14 Michal Filka 2014-01-13 20:47:09 UTC
(In reply to comment #13)
> I suspect that this fix might not sufficient.  Does it assume that all bridge
> devices begin with "br"?  

No it doesn't. The fix repairs a bug in internal api, where device detection is already done and device name is not in game anymore.> 

> YCPDialogParser.cc(parseLabel):1213        THROW:    Invalid arguments for the
> Label widget

This is main problem. An exception is raised. The exception is caught, exception handler displays the popup and the module ends.
Comment 15 Adam Spiers 2014-01-14 00:04:41 UTC
Thanks.  So should I file a new bug?
Comment 16 Michal Filka 2014-01-14 07:48:48 UTC
(In reply to comment #15)
> Thanks.  So should I file a new bug?

yes, please.
Comment 17 Adam Spiers 2014-01-14 16:03:41 UTC
Filed as bug 858703.
Comment 20 Swamp Workflow Management 2015-09-10 17:10:13 UTC
SUSE-RU-2015:1530-1: An update that has three recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 851769,913722,938059
CVE References: 
Sources used:
SUSE Linux Enterprise Software Development Kit 11-SP3 (src):    yast2-2.17.135.2-9.2
SUSE Linux Enterprise Server for VMWare 11-SP3 (src):    yast2-2.17.135.2-9.2
SUSE Linux Enterprise Server 11-SP3 (src):    yast2-2.17.135.2-9.2
SUSE Linux Enterprise Desktop 11-SP3 (src):    yast2-2.17.135.2-9.2
Comment 21 Knut Alejandro Anderssen González 2018-02-14 10:59:24 UTC
*** Bug 848637 has been marked as a duplicate of this bug. ***