Tap will not start on Gentoo/Linux
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.
-----------
into this code:
-----------
def prog(self):
return "/sbin/modprobe tun && " + self.settings.
-----------
I tried here and works well (now the first scenario ends with success).
What do you think? Can we accept this change?
Changed in virtualbrick: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Abbakus (abbakus) |
milestone: | none → 0.5 |
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??
;)