Re: libvirtError: internal error cannot create rule since ebtables tool is missing.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/15/2012 03:08 AM, Phantomcircuit wrote:
> # libvirtd --version
> libvirtd (libvirt) 0.9.8
> # which ebtables
> /sbin/ebtables
> 
> 2012-02-15 09:40:59.083+0000: 17675: error :
> ebtablesCreateRuleInstance:1943 : internal error cannot create rule
> since ebtables tool is missing.
> 2012-02-15 09:40:59.107+0000: 17675: error : virNetDevGetIndex:656 :
> Unable to get index for interface vnet0: No such device
> 
> ebtables_cmd_path = virFindFileInPath("ebtables");
> 
> I can't figure out why ebtables_cmd_path is NULL when the call to
> ebtablesCreateRuleInstance is made.

Does the $PATH in use by libvirtd include /sbin by default on your
system?  Not all systems put /sbin on the path.

Hmm, looks like we have a couple bugs:

1. configure.ac sets EBTABLES_PATH, but only adds /usr/sbin, and not
/sbin, to the PATH used to find it, but then defaults to /sbin/ebtables
if the PATH search failed.  This is fragile (the fallback value should
be tested for existence before hard-coding it into the executable).

2. src/util/ebtables.c uses EBTABLES_PATH, while
src/nwfilter/nwfilter_ebiptables_driver.c only uses a PATH lookup of the
raw "ebtables".  These should be consolidated to use the same program
(that is, if the user did ./configure EBTABLES=/path/to/alternate, we
should prefer that name rather than half-and-half).

Patches welcome.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]