I did another experiment and got the same result.  I have included the system 
logs in this case - perhaps it is informative?

Running the following instructions on the latest git clone of the OVS 
repository:

./boot.sh
./configure --with-linux=/lib/modules/`uname -r`/build
make
make install
touch /usr/local/etc/ovs-vswitchd.conf
mkdir -p /usr/local/etc/openvswitch
mkdir -p /usr/local/var/run/openvswitch/
touch /usr/local/etc/ovs-vswitchd.conf
ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema
ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \
                     --remote=db:Open_vSwitch,Open_vSwitch,manager_options \
                     --private-key=db:Open_vSwitch,SSL,private_key \
                     --certificate=db:Open_vSwitch,SSL,certificate \
                     --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \
                     --pidfile --detach
ovs-vsctl --no-wait init
ovs-vswitchd --pidfile --detach

ovs-vsctl add-br br1 -- set bridge br1 datapath_type=netdev
ovs-vsctl add-port br1 p1 -- set interface p1 ofport_request=1 --
ovs-vsctl add-port br1 p2 -- set interface p2 ofport_request=2 --
ovs-vsctl show

I get these system logs:

Jul 22 22:16:18 donkey ovsdb-server: ovs|00001|ovsdb_server|INFO|ovsdb-server 
(Open vSwitch) 1.11.90
Jul 22 22:16:18 donkey ovs-vsctl: ovs|00001|vsctl|INFO|Called as ovs-vsctl 
--no-wait init
Jul 22 22:16:18 donkey ovs-vswitchd: 
ovs|00001|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock: 
connecting...
Jul 22 22:16:18 donkey ovs-vswitchd: 
ovs|00002|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock: connected
Jul 22 22:16:18 donkey ovs-vswitchd: ovs|00003|bridge|INFO|ovs-vswitchd (Open 
vSwitch) 1.11.90
Jul 22 22:16:23 donkey ovs-vsctl: ovs|00001|vsctl|INFO|Called as ovs-vsctl 
add-br br1 -- set bridge br1 datapath_type=netdev
Jul 22 22:16:23 donkey NetworkManager:    SCPlugin-Ifupdown: devices added 
(path: /sys/devices/virtual/net/ovs-netdev, iface: ovs-netdev)
Jul 22 22:16:23 donkey NetworkManager:    SCPlugin-Ifupdown: device added 
(path: /sys/devices/virtual/net/ovs-netdev, iface: ovs-netdev): no ifupdown 
configuration found.
Jul 22 22:16:23 donkey NetworkManager: <WARN>  device_creator(): 
/sys/devices/virtual/net/ovs-netdev: couldn't determine device driver; 
ignoring...
Jul 22 22:16:23 donkey NetworkManager:    SCPlugin-Ifupdown: devices added 
(path: /sys/devices/virtual/net/br1, iface: br1)
Jul 22 22:16:23 donkey NetworkManager:    SCPlugin-Ifupdown: device added 
(path: /sys/devices/virtual/net/br1, iface: br1): no ifupdown configuration 
found.
Jul 22 22:16:23 donkey NetworkManager: <WARN>  device_creator(): 
/sys/devices/virtual/net/br1: couldn't determine device driver; ignoring...
Jul 22 22:16:23 donkey kernel: [21243.427906] device ovs-netdev entered 
promiscuous mode
Jul 22 22:16:23 donkey ovs-vswitchd: ovs|00004|bridge|INFO|bridge br1: added 
interface br1 on port 65534
Jul 22 22:16:23 donkey ovs-vswitchd: ovs|00005|dpif_linux|ERR|Generic Netlink 
family 'ovs_datapath' does not exist. The Open vSwitch kernel module is 
probably not loaded.
Jul 22 22:16:23 donkey kernel: [21243.432902] device br1 entered promiscuous 
mode
Jul 22 22:16:23 donkey ovs-vswitchd: ovs|00006|bridge|INFO|bridge br1: using 
datapath ID 0000e2afa43e494b
Jul 22 22:16:23 donkey ovs-vswitchd: ovs|00007|connmgr|INFO|br1: added service 
controller "punix:/usr/local/var/run/openvswitch/br1.mgmt"
Jul 22 22:16:23 donkey ovs-vsctl: ovs|00001|vsctl|INFO|Called as ovs-vsctl 
add-port br1 p1 -- set interface p1 ofport_request=1 --
Jul 22 22:16:23 donkey ovs-vswitchd: ovs|00008|bridge|WARN|could not open 
network device p1 (No such device)
Jul 22 22:16:23 donkey ovs-vsctl: ovs|00001|vsctl|INFO|Called as ovs-vsctl 
add-port br1 p2 -- set interface p2 ofport_request=2 --
Jul 22 22:16:23 donkey ovs-vswitchd: ovs|00009|bridge|WARN|could not open 
network device p1 (No such device)
Jul 22 22:16:23 donkey ovs-vswitchd: ovs|00010|bridge|WARN|could not open 
network device p2 (No such device)
Jul 22 22:16:28 donkey ovsdb-server: ovs|00002|memory|INFO|1188 kB peak 
resident set size after 10.0 seconds
Jul 22 22:16:28 donkey ovsdb-server: ovs|00003|memory|INFO|cells:183 monitors:1 
sessions:1
Jul 22 22:16:28 donkey ovs-vswitchd: ovs|00011|memory|INFO|1612 kB peak 
resident set size after 10.4 seconds
Jul 22 22:16:28 donkey ovs-vswitchd: ovs|00012|memory|INFO|facets:3 ports:1 
rules:4 subfacets:3
Jul 22 22:16:34 donkey kernel: [21254.230010] br1: no IPv6 routers present

Cannot explain why ports p1 and p2 are not added to br1.  Any help would be 
greatly appreciated!

Regards,


Benjamin Lunsky
[email protected]


---




On 22 Jul 2013, at 12:20 PM, Benjamin Lunsky <[email protected]> 
wrote:

> Hi there,
> 
> I am unable to add a port successfully using the following commands:
> 
> ovs-vsctl add-br br1 -- set bridge br1 datapath_type=netdev
> ovs-vsctl add-port br1 p1 -- set interface p1 ofport_request=1 --
> 
> The second line causes an error in lib/netdev-linux.c in the do_get_ifindex 
> function - an error value of 19 is returned.
> Does anyone know why this may be the case?
> 
> static int
> do_get_ifindex(const char *netdev_name)
> {
>     struct ifreq ifr;
>     ovs_strzcpy(ifr.ifr_name, netdev_name, sizeof ifr.ifr_name);
>     COVERAGE_INC(netdev_get_ifindex);
>     if (ioctl(af_inet_sock, SIOCGIFINDEX, &ifr) < 0) {
>         VLOG_WARN_RL(&rl, "ioctl(SIOCGIFINDEX) on %s device failed: %s",
>                      netdev_name, strerror(errno));
>         return -errno;
>     }
>     return ifr.ifr_ifindex;
> }
> 
> The above function is invoked from dpif-netdev.c, in the line: error = 
> netdev_listen(netdev);  
> This calls netdev_listen in netdev.c
> Which then calls netdev_linux_listen in netdev-linux.c
> This calls a sequence of functions in netdev-linux.c ending in do_get_ifindex 
> (above).
> 
> Thanks
> 
> Benjamin
> 
> 
> 
> Benjamin Lunsky
> [email protected]
> 
> 
> ---
> 
> 
> 
> 

_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to