Bug 483233

Summary: tap network device not fully supported and breaking routing
Product: [openSUSE] openSUSE 11.1 Reporter: Ralf Hülsmann <ralf>
Component: YaST2Assignee: Michal Zugec <mzugec>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None CC: mt
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 11.1   
Whiteboard: maint:released:sle11:23597
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2log - see later pdf
screenshoots how the log was generated

Description Ralf Hülsmann 2009-03-08 11:58:01 UTC
User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; InfoPath.2; MS-RTC LM 8; .NET CLR 3.5.21022; OfficeLiveConnector.1.3; OfficeLivePatch.1.3)

The tap device seems to be not implented in such way, that it works without a additional bridge.

That does not make sense, since the tap itself act a a ethernet broadcast domain (hub) and many usecases (e.g. in virtualization) are perfectly fullfilled with "tap only".

while this would not be a big deal, it even breaks the routing by removing the standard gateway each time the network module in Yast is run and brings up partly information about the tap in Yast.

Restart parameters seem to be not definable via the sysconfig/network/ifcfg-tap0 .


Reproducible: Always

Steps to Reproduce:
1. set up a system without a tap, including functional network config with a standard gateway
2. add a tapp via Yast2 (does not matter wether GUI or CLI)
3. try to add an IP-adress to the tap
4. close Yast2 with the tap configured
Actual Results:  
1. you are not able to add an IP via Yast2
2. your standard gatway is lost
(at least on 4 seperate testmachnines on X86, X86_64)

Expected Results:  
1. you could configure a persistent IP
2. standard gateway is untouched

The bad thing is: it breaks the standard gateway.
And it breaks it each time you call the network module and finish saving it.

The not so bad thing is: IP must be configured at CLI via ifconfig tap0 192.168.100.1.

Furthermore the tap is not persistent, so next time you need to go through Yast again (but be beware, standardgateway gets lost) or use CLI tunctl –u root  -t tap0 .



The setup is documente (in german) at  http://www.ralf-haifisch.biz/DE-vbox_auf_suse_11.shtml
Comment 1 Cyril Hrubis 2009-03-17 17:51:13 UTC
Please attach y2logs. If you are in doubt follow:

http://en.opensuse.org/Bugs/YaST

Thanks!
Comment 2 Ralf Hülsmann 2009-03-17 22:59:35 UTC
Created attachment 280162 [details]
y2log - see later pdf
Comment 3 Ralf Hülsmann 2009-03-17 23:19:57 UTC
Created attachment 280166 [details]
screenshoots how the log was generated
Comment 4 Marius Tomaschewski 2009-03-24 10:27:15 UTC
(In reply to comment #0)
> Steps to Reproduce:
> 1. set up a system without a tap, including functional network config with a
> standard gateway
> 2. add a tapp via Yast2 (does not matter wether GUI or CLI)
> 3. try to add an IP-adress to the tap
> 4. close Yast2 with the tap configured
> Actual Results:  
> 1. you are not able to add an IP via Yast2
> 2. your standard gatway is lost
> (at least on 4 seperate testmachnines on X86, X86_64)
> 
> Expected Results:  
> 1. you could configure a persistent IP
> 2. standard gateway is untouched
> 
> The bad thing is: it breaks the standard gateway.
> And it breaks it each time you call the network module and finish saving it.

That yast2 does not allow to set IP for the tap is a bug.

That a default route gets deleted, is a bug too. We've to investigate
why this happens (yes, it is a bad thing).

> The not so bad thing is: IP must be configured at CLI via ifconfig tap0
> 192.168.100.1.

Since yast2 can't set it (at the moment), you've to correct it manually:

  echo "IPADDR='192.168.100.1/24'" >> ifcfg-tap0

and call then:
  ifdown tap0
  ifup tap0
or
  rcnetwork restart tap0

> Furthermore the tap is not persistent, so next time you need to go through

This is AFAIS not true. I've tested it just now and yast2 created a persistent
tap config (/etc/sysconfig/network/ifcfg-tap0):

  BOOTPROTO='static'
  STARTMODE='onboot'
  TUNNEL='tap'
  TUNNEL_SET_GROUP=''
  TUNNEL_SET_OWNER=''
  TUNNEL_SET_PERSISTENT='yes'
  # added manually
  IPADDR='192.168.100.1/24'

You can also set owner/group in yast2, but uid 0 as owner is default.

Further, you can use
 PRE_UP_SCRIPT, POST_UP_SCRIPT, PRE_DOWN_SCRIPT, POST_DOWN_SCRIPT
or scripts in ifservices-tap0 or also if-{up,down}.d to start/stop
whatever you like when the tap interface gets up and down via ifup
and ifdown (e.g. network restart).
Comment 5 Marius Tomaschewski 2009-03-24 10:31:56 UTC
BTW:
Please note also, that tap interfaces are started by the
  /etc/init.d/network-remotefs
(requires already mounted $remote_fs [nfs, cifs]) script.
Comment 6 Marius Tomaschewski 2009-03-24 10:32:44 UTC
When the system is booting I mean.
Comment 7 Marius Tomaschewski 2009-03-24 10:47:07 UTC
(In reply to comment #0)
> Furthermore the tap is not persistent, so next time you need to go through

It was created with TUNNEL_SET_PERSISTENT=yes -- from your logs:

network/lan/address.ycp:182 initTunnel $["BOOTPROTO":"dhcp", "STARTMODE":"onboot", "TUNNEL":"tap", "TUNNEL_SET_GROUP":"", "TUNNEL_SET_OWNER":"", "TUNNEL_SET_PERSISTENT":"yes"]

[It even cannot be created non-persistently via ifcfg file or yast2.
 A non-persistent interface can be created only by a daemon driving
 the tap, that actively holds the interface open and starting of such
 a daemon is not supported yet in the ifup-tunnel script (this error
 message you'll get from ifup when you try to set it to "no").]
Comment 8 Marius Tomaschewski 2009-03-24 11:22:39 UTC
(In reply to comment #0)
> Steps to Reproduce:
> 1. set up a system without a tap, including functional network config with a
> standard gateway

I was unable to reproduce that the default route gets deleted. Did you
add the default route manually?
Or was it configured in /etc/sysconfig/network/{routes,ifroute-eth0} ?
Comment 9 Michal Zugec 2009-03-24 11:55:01 UTC
I reproduced it
/etc/sysconfig/network/routes information is deleted by YaST (I'm going to fix it)
Comment 10 Michal Zugec 2009-03-24 13:43:18 UTC
fixed in yast2-network-2.18.22
Comment 11 Ralf Hülsmann 2009-03-24 18:35:26 UTC
so there is no step needed from my side any more ?

will this be available by YOU after a while ?


cheers
Ralf
Comment 12 Michal Zugec 2009-03-25 09:26:11 UTC
>> so there is no step needed from my side any more ?

correct

>> will this be available by YOU after a while ?
No, because it was fixed for 11.2. It's not security bug
But I'll create fixed package in my OBS
Comment 13 Michal Zugec 2009-03-25 09:31:44 UTC
http://download.opensuse.org/repositories/home://mzugec/openSUSE_11.1/
fixed version is yast2-network-2.17.78
Comment 16 Marius Tomaschewski 2009-03-26 11:13:09 UTC
The deletion of the default route is IMO at least major.
Comment 19 Swamp Workflow Management 2009-03-30 14:09:27 UTC
The SWAMPID for this issue is 23570.
Please submit the patch and patchinfo file using this ID.
(https://swamp.suse.de/webswamp/wf/23570)
Comment 22 Michal Zugec 2009-04-01 08:18:46 UTC
close as fixed
Comment 23 Swamp Workflow Management 2009-05-18 22:09:15 UTC
Update released for: yast2-network, yast2-network-devel-doc
Products:
SLE-DESKTOP 11 (i386, x86_64)
SLE-SDK 11 (i386, ia64, ppc64, s390x, x86_64)
SLE-SERVER 11 (i386, ia64, ppc64, s390x, x86_64)
Comment 24 Swamp Workflow Management 2009-05-19 12:37:12 UTC
Update released for: yast2-network, yast2-network-devel-doc
Products:
openSUSE 11.1 (i586, ppc, x86_64)