Capture Interface fails to start
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Virtualbricks |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I tried to setup a capture interface with the following options (taken from the config file):
[Capture:
pon_vbevent=
poff_vbevent=
iface=eth0
sock=/
name=uplink_eth0
The start of that brick failed with the following message:
OSError: Brick startup failed. Check your configuration!
Further debugging led to the following command line that was issued during the setup of that brick:
['/usr/
Above you see that the first three items are concatenated white there are two more (separate) arguments following.
The subprocess module cannot handle this mixture and bascially complains that there is no file with the name of the first list item.
The attached patch does the following:
1) simplify and fix the parameter handling (no more manual string concatenation and escaping) - this fixes the bug
2) skip the use of "sudo" if it is not necessary (e.g. for root)
3) warn if sudo is required, but not available
4) simplify the parsing of config file strings containing a "=" (e.g. a kernel parameter like "root=/dev/sda")
cheers,
Lars
Changed in virtualbrick: | |
milestone: | none → 1.0 |
Changed in virtualbrick: | |
status: | Fix Committed → Fix Released |
Which version of vb are you using? If you are using the last stable, can
you try to use the version vb-debug (you have to download the code using
bzr) instead?
Francesco
Il 01/nov/2013 02:55 "Lars Kruse" <email address hidden> ha scritto:
> Public bug reported: uplink_ eth0] .virtualbricks/ uplink. ctl bin/vde_ pcapplug eth0 -s /root/. virtualbricks/ uplink. ctl -P eth0.pid' , '-s', '/root/ .virtualbricks/ uplink. ctl'] /bugs.launchpad .net/bugs/ 1246943/ +attachment/ 3897245/ +files/ virtualbricks_ capture_ interface. patch /bugs.launchpad .net/bugs/ 1246943 uplink_ eth0] .virtualbricks/ uplink. ctl bin/vde_ pcapplug eth0 -s /root/. virtualbricks/ uplink. ctl -P eth0.pid' , '-s', '/root/ .virtualbricks/ uplink. ctl']
>
> I tried to setup a capture interface with the following options (taken
> from the config file):
>
> [Capture:
> pon_vbevent=
> poff_vbevent=
> iface=eth0
> sock=/root/
> name=uplink_eth0
>
> The start of that brick failed with the following message:
> OSError: Brick startup failed. Check your configuration!
>
> Further debugging led to the following command line that was issued during
> the setup of that brick:
> ['/usr/
> /tmp/uplink_
>
> Above you see that the first three items are concatenated white there are
> two more (separate) arguments following.
> The subprocess module cannot handle this mixture and bascially complains
> that there is no file with the name of the first list item.
>
> The attached patch does the following:
> 1) simplify and fix the parameter handling (no more manual string
> concatenation and escaping) - this fixes the bug
> 2) skip the use of "sudo" if it is not necessary (e.g. for root)
> 3) warn if sudo is required, but not available
> 4) simplify the parsing of config file strings containing a "=" (e.g. a
> kernel parameter like "root=/dev/sda")
>
> cheers,
> Lars
>
> ** Affects: virtualbrick
> Importance: Undecided
> Status: New
>
> ** Attachment added: "Fix parameter handling for capture interface"
>
> https:/
>
> --
> You received this bug notification because you are subscribed to
> Virtualbricks.
> https:/
>
> Title:
> Capture Interface fails to start
>
> Status in Virtualbricks:
> New
>
> Bug description:
> I tried to setup a capture interface with the following options (taken
> from the config file):
>
> [Capture:
> pon_vbevent=
> poff_vbevent=
> iface=eth0
> sock=/root/
> name=uplink_eth0
>
> The start of that brick failed with the following message:
> OSError: Brick startup failed. Check your configuration!
>
> Further debugging led to the following command line that was issued
> during the setup of that brick:
> ['/usr/
> /tmp/uplink_
>
> Above you see that the first three items are concatenated white there
> are two more (separate) arguments following.
> The subprocess module cannot handle this mixture and bascially complains
> that there is no file with the name of the first list item.
>
> The attached patch does the following:
> 1) simplify and fix the parameter handling (no more manual string
> concatenation and escaping) - this fixes the bug
> 2) skip the use of "sudo" if it is not necessary (e.g. for root)
> 3) warn if sudo is required, but not a...