Tap will not start on Gentoo/Linux

Bug #781705 reported by Abbakus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Virtualbricks
Invalid
Undecided
Abbakus

Bug Description

I use Gentoo.

I likely found why Tap was not working here. It's related to "tun" module. This module is not loaded by default on my system.

First scenario:
1) I restart my machine
2) I start Vb and from here a Tap
 ==> The Tap try to start without success. The "tun" module is not automatically loaded ("lsmod|grep -i tun" is nil)

Second scenario:
1) I restart my machine
2) I load "tun" manually ("#modprobe tun" "lsmod|grep -i tun" returns the pid)
3) I start Vb and from here a Tap
 ==> All is started correctly
4) I close Vb
5) I remove "tun" ("#modprobe -r tun"; "lsmod|grep -i tun" is nil)
6) Now if I start a tap from Vb again, "tun" is re-loaded automatically and all is ok

It seems the first time I have to load "tun" by hand.

I don't know what happens on other distributions but if we call a "modprobe tun" before the "vde_plug2tap" we should solve the problem where the module is to be loaded manually as well as where it's already loaded (or correctly loaded automatically).
I suggest to simply change this code:
------------
 def prog(self):
  return self.settings.get("vdepath") + "/vde_plug2tap"
-----------
into this code:
-----------
 def prog(self):
  return "/sbin/modprobe tun && " + self.settings.get("vdepath") + "/vde_plug2tap"
-----------

I tried here and works well (now the first scenario ends with success).

What do you think? Can we accept this change?

Abbakus (abbakus)
Changed in virtualbrick:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Abbakus (abbakus)
milestone: none → 0.5
Revision history for this message
Daniele Lacamera (o-root-danielinux-net) wrote : Re: [Bug 781705] [NEW] Tap will not start on Gentoo/Linux

For me it is OK. Modprobe always exit with success even when the module is
already loaded, so the "&&" operator should be harmless there.

Are you saying that from now on you will test the TAP brick before committing??
;)

Revision history for this message
Abbakus (abbakus) wrote :

I will.

Revision history for this message
Abbakus (abbakus) wrote :

Fixed on rev. 282

Changed in virtualbrick:
status: Confirmed → Fix Committed
Revision history for this message
Daniele Lacamera (o-root-danielinux-net) wrote :

Reverted in r290. Setting to invalid because it breaks tap. See bug #784877 for the new solution.

Changed in virtualbrick:
status: Fix Committed → Invalid
importance: Medium → Undecided
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.