Hi,all:

I have a question about xen using ovs to ask for your advice.

When Xen networking start , I want to rename the physical network adapter 
'eth0' to  'peth0', and  create a bridge 'eth0
', add the port 'peth0' to bridge 'eth0'. With the linux bridge , the xen 
script 'network-bridge' work well, but when using the ovs bridge to create 
bridge , the xen script 'network-bridge' doesn't work.

with the way discussed before in the mail list, I changed the 
network-bridge script like this:
>     ip link set ${tdev} name ${bridge}
>     # usually tdev=tmpbridge, bridge=eth0
>     /usr/local/bin/ovs-vsctl set Interface ${tdev} name=${bridge}
>     /usr/local/bin/ovs-vsctl set Port ${tdev} name=${bridge}
>     /usr/local/bin/ovs-vsctl set Bridge ${tdev} name=${bridge}

after executed the network-bridge, using the 'brctl show' command ,the 
result is as:
[root@vnet_tecs scripts]# brctl show
bridge name     bridge id               STP enabled     interfaces
eth0                0000.1e3ce1d5604e       no

the port 'peth0' was not added to the bridge 'eth0'.

using the 'ovs-vsctl list-br' command ,the result is as:
[root@vnet_tecs scripts]# ovs-vsctl list-br
eth0

the eth0 was created and the port was added to the bridge 'eth0'.

How can this be achieved?

My xen version is V4.1 and ovs verion is v1.3.0.

Looking forward to your early reply. Thanks very much!

Alan





=======================================

Hi, 

I'm coming back to this problem.

To handle the renaming issue of Xen networking scripts, I tried 'ovs-vsctl 
set' commands as follows: renaming interface, port and then bridge, as the 
order seems matter.

Where bridge name is renamed,
>     ip link set ${tdev} name ${bridge}
>     # usually tdev=tmpbridge, bridge=eth0
>     /usr/local/bin/ovs-vsctl set Interface ${tdev} name=${bridge}
>     /usr/local/bin/ovs-vsctl set Port ${tdev} name=${bridge}
>     /usr/local/bin/ovs-vsctl set Bridge ${tdev} name=${bridge}

Similarly, I put 
                 `ovs-vsctl set Interface'
                 `ovs-vsctl set Port'
in the places where interfaces are renamed in the xen scripts. 

Then, after rebooting, all the networking at dom0 works fine and IP-based 
communications from/to domU work fine too. For example, 'ping x.x.x.x' and 
'wget' x.x.x.x' from domU are okay.

However, any actions involves DNS (e.g., ping www.google.com) from domU 
cause the entire system (dom0) crash and reboot. 

Did you see any similar phenomena with OVS before? Or do you have any 
other suggestions to deal with the renaming issue?

With the previous version of OVS, which used a text-based configuration 
file, just using 'sed' on the ovs conf file for renaming worked fine. 

Thank you.
-- JK

> -----Original Message-----
> From: discuss-bounces at openvswitch.org [mailto:discuss-
> bounces at openvswitch.org] On Behalf Of Lee, Jeongkeun
> Sent: Wednesday, March 24, 2010 9:36 PM
> To: discuss at openvswitch.org
> Subject: [ovs-discuss] bridge renaming issue with Xen
> 
> Hi Ben and Jesse,
> 
> I'm trying to use ovs 0.99.2 with Xen on Lenny.
> As you know, Xen calls 'ip link set' commands to rename a bridge but 
ovs-
> brcompatd does not proxy 'ip link set name' command.
> 
> > From: "Jesse Gross" <jesse at nicira.com>
> >
> > Earlier versions of Xen networking (which apparently the Lenny port is
> > based
> > on) used some "interesting" tricks with renaming. In this case eth0 is
> > renamed to peth0 and a bridge named tmpbridge is created then renamed
> > to eth0.
> 
> With the previous version of ovs that doesn't use OVSDB, I simply 
changed
> the bridge name directly on the ovs/brcompatd config file by modifying
> Xen networking scripts as follows:
> 
>     ...
>     ip link set ${tdev} name ${bridge}
>     # ovs-brcompatd does not proxy 'ip link set name' command
>     # need to manually change the bridge name in the ovs config file
>     # usually tdev=tmpbridge, bridge=eth0
>     sed -i "s/${tdev}/${bridge}/g" /etc/ovs-vswitchd-xen.conf  <- added
> line
>     ...
> 
> So, the same renaming should be done on the config DB with ovs 0.99.2 
and
> I tried the following 'ovs-vsctl set' commands:
> 
>     ip link set ${tdev} name ${bridge}
>     # sed -i "s/${tdev}/${bridge}/g" ${cfg}
>     # usually tdev=tmpbridge, bridge=eth0
>     /usr/local/bin/ovs-vsctl set Bridge ${tdev} name=${bridge}
>     /usr/local/bin/ovs-vsctl set Port ${tdev} name=${bridge}
>     /usr/local/bin/ovs-vsctl set Interface ${tdev} name=${bridge}
> 
> Then, after finishing booting, 'brctl show' and 'ovs-dpctl show' look
> fine in dom0 but generating any packets from domU crashes the system and
> dom0 automatically reboots. Syslog caught warning and error messages
> shown below. It seems like 'ovs-vsctl set' does more than just renaming
> DB entries. Can you help me to find the right use of this command? maybe
> the order between Bridge, Port, and Interface renaming matters..?
> 
> 
> 
> ~~~~~~~~~~~~~~~~~~~ SYSLOG dump ~~~~~~~~~~~~~~~~~~~~~~~~~
> Mar 24 20:14:52 majuan ovs-vsctl: 00001|vsctl|INFO|Called as
> /usr/local/bin/ovs-vsctl set Bridge tmpbridge name=eth0
> Mar 24 20:14:52 majuan ovsdb-server:
> 00009|reconnect|INFO|unix:/tmp/stream-unix.4694.0: connecting...
> Mar 24 20:14:52 majuan ovsdb-server:
> 00010|reconnect|INFO|unix:/tmp/stream-unix.4694.0: connected
> Mar 24 20:14:52 majuan ovs-brcompatd: 00003|brcompatd|INFO|kernel
> reported network device eth0 removed but a device by that name exists 
(XS
> Tools 5.0.0?)
> Mar 24 20:14:52 majuan ovs-vswitchd: 00010|dpif|WARN|system at dp0:
> flow_flush failed (No such device)
> Mar 24 20:14:52 majuan ovs-vswitchd: 00011|ofproto|INFO|using datapath 
ID
> 000000232099dc82
> Mar 24 20:14:52 majuan ovs-vswitchd: 00012|bridge|INFO|created bridge
> eth0 on system at dp0
> Mar 24 20:14:52 majuan ovs-vswitchd: 00013|bridge|INFO|created port
> tmpbridge on bridge eth0
> Mar 24 20:14:52 majuan ovs-vswitchd: 00014|netdev|WARN|failed to get
> flags for network device tmpbridge: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00015|bridge|WARN|could not create
> iface tmpbridge: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00016|dpif|WARN|system at dp0: 
failed
> to add tmpbridge as port: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00017|bridge|ERR|failed to add
> tmpbridge interface to system at dp0: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00018|netdev|WARN|failed to get
> flags for network device tmpbridge: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00019|bridge|WARN|could not open
> netdev on tmpbridge, dropping: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00020|bridge|ERR|tmpbridge port has
> no interfaces, dropping
> Mar 24 20:14:52 majuan ovs-vswitchd: 00021|bridge|WARN|bridge eth0: 
using
> default bridge Ethernet address 00:23:20:cf:19:dc
> Mar 24 20:14:52 majuan ovs-vswitchd: 00022|ofproto|INFO|datapath ID
> changed to 0000002320cf19dc
> Mar 24 20:14:52 majuan ovs-vswitchd: 00023|netdev|WARN|attempted to
> create a device that may not be created: eth0
> Mar 24 20:14:52 majuan ovs-vswitchd: 00024|ofproto|WARN|ignoring port
> eth0 (0) because netdev eth0 cannot be opened (No such device)
> Mar 24 20:14:52 majuan ovsdb-server: 
00011|jsonrpc|INFO|unix:/tmp/stream-
> unix.4694.0: connection closed
> Mar 24 20:14:52 majuan ovsdb-server:
> 00012|reconnect|INFO|unix:/tmp/stream-unix.4694.0: connection dropped
> Mar 24 20:14:52 majuan ovs-vswitchd: 00025|netdev|WARN|attempted to
> create a device that may not be created: eth0
> Mar 24 20:14:52 majuan ovs-vswitchd: 00026|ofproto|WARN|ignoring port
> eth0 (0) because netdev eth0 cannot be opened (No such device)
> Mar 24 20:14:52 majuan ovs-vswitchd: 00027|bridge|INFO|created port
> tmpbridge on bridge eth0
> 
> Mar 24 20:14:52 majuan ovs-vsctl: 00001|vsctl|INFO|Called as
> /usr/local/bin/ovs-vsctl set Port tmpbridge name=eth0
> Mar 24 20:14:52 majuan ovsdb-server:
> 00013|reconnect|INFO|unix:/tmp/stream-unix.4712.0: connecting...
> Mar 24 20:14:52 majuan ovsdb-server:
> 00014|reconnect|INFO|unix:/tmp/stream-unix.4712.0: connected
> Mar 24 20:14:52 majuan ovs-vswitchd: 00028|netdev|WARN|failed to get
> flags for network device tmpbridge: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00029|bridge|WARN|could not create
> iface tmpbridge: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00030|dpif|WARN|system at dp0: 
failed
> to add tmpbridge as port: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00031|bridge|ERR|failed to add
> tmpbridge interface to system at dp0: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00032|netdev|WARN|failed to get
> flags for network device tmpbridge: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00033|bridge|WARN|could not open
> netdev on tmpbridge, dropping: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00034|bridge|ERR|tmpbridge port has
> no interfaces, dropping
> Mar 24 20:14:52 majuan ovs-vswitchd: 00035|bridge|WARN|bridge eth0: 
using
> default bridge Ethernet address 00:23:20:cf:19:dc
> Mar 24 20:14:52 majuan ovs-vswitchd: 00036|netdev|WARN|attempted to
> create a device that may not be created: eth0
> Mar 24 20:14:52 majuan ovs-vswitchd: 00037|ofproto|WARN|ignoring port
> eth0 (0) because netdev eth0 cannot be opened (No such device)
> Mar 24 20:14:52 majuan ovs-vswitchd: 00038|bridge|INFO|created port eth0
> on bridge eth0
> Mar 24 20:14:52 majuan ovs-vswitchd: 00039|netdev|WARN|failed to get
> flags for network device tmpbridge: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00040|bridge|WARN|could not create
> iface tmpbridge: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00041|dpif|WARN|system at dp0: 
failed
> to add tmpbridge as port: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00042|bridge|ERR|failed to add
> tmpbridge interface to system at dp0: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00043|netdev|WARN|failed to get
> flags for network device tmpbridge: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00044|bridge|WARN|could not open
> netdev on tmpbridge, dropping: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00045|bridge|ERR|eth0 port has no
> interfaces, dropping
> Mar 24 20:14:52 majuan ovs-vswitchd: 00046|bridge|WARN|bridge eth0: 
using
> default bridge Ethernet address 00:23:20:cf:19:dc
> Mar 24 20:14:52 majuan ovs-vswitchd: 00047|netdev|WARN|attempted to
> create a device that may not be created: eth0
> Mar 24 20:14:52 majuan ovs-vswitchd: 00048|ofproto|WARN|ignoring port
> eth0 (0) because netdev eth0 cannot be opened (No such device)
> Mar 24 20:14:52 majuan ovsdb-server: 
00015|jsonrpc|INFO|unix:/tmp/stream-
> unix.4712.0: connection closed
> Mar 24 20:14:52 majuan ovsdb-server:
> 00016|reconnect|INFO|unix:/tmp/stream-unix.4712.0: connection dropped
> Mar 24 20:14:52 majuan ovs-vswitchd: 00049|netdev|WARN|attempted to
> create a device that may not be created: eth0
> Mar 24 20:14:52 majuan ovs-vswitchd: 00050|ofproto|WARN|ignoring port
> eth0 (0) because netdev eth0 cannot be opened (No such device)
> Mar 24 20:14:52 majuan ovs-vswitchd: 00051|bridge|INFO|created port eth0
> on bridge eth0
> 
> Mar 24 20:14:52 majuan ovs-vsctl: 00001|vsctl|INFO|Called as
> /usr/local/bin/ovs-vsctl set Interface tmpbridge name=eth0
> Mar 24 20:14:52 majuan ovsdb-server:
> 00017|reconnect|INFO|unix:/tmp/stream-unix.4721.0: connecting...
> Mar 24 20:14:52 majuan ovsdb-server:
> 00018|reconnect|INFO|unix:/tmp/stream-unix.4721.0: connected
> Mar 24 20:14:52 majuan ovs-vswitchd: 00052|netdev|WARN|failed to get
> flags for network device tmpbridge: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00053|bridge|WARN|could not create
> iface tmpbridge: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00054|dpif|WARN|system at dp0: 
failed
> to add tmpbridge as port: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00055|bridge|ERR|failed to add
> tmpbridge interface to system at dp0: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00056|netdev|WARN|failed to get
> flags for network device tmpbridge: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00057|bridge|WARN|could not open
> netdev on tmpbridge, dropping: No such device
> Mar 24 20:14:52 majuan ovs-vswitchd: 00058|bridge|ERR|eth0 port has no
> interfaces, dropping
> Mar 24 20:14:52 majuan ovs-vswitchd: 00059|bridge|WARN|bridge eth0: 
using
> default bridge Ethernet address 00:23:20:cf:19:dc
> Mar 24 20:14:52 majuan ovs-vswitchd: 00060|netdev|WARN|attempted to
> create a device that may not be created: eth0
> Mar 24 20:14:52 majuan ovs-vswitchd: 00061|bridge|INFO|created port eth0
> on bridge eth0
> Mar 24 20:14:52 majuan ovs-vswitchd: 00062|bridge|WARN|bridge eth0: 
using
> default bridge Ethernet address 00:23:20:cf:19:dc
> Mar 24 20:14:52 majuan ovs-vswitchd: 00063|bridge|WARN|bridge eth0: 
using
> default bridge Ethernet address 00:23:20:cf:19:dc
> Mar 24 20:14:52 majuan ovsdb-server: 
00019|jsonrpc|INFO|unix:/tmp/stream-
> unix.4721.0: connection closed
> Mar 24 20:14:52 majuan ovsdb-server:
> 00020|reconnect|INFO|unix:/tmp/stream-unix.4721.0: connection dropped
> Mar 24 20:14:55 majuan ovs-vswitchd: 00064|bridge|INFO|created port 
peth0
> on bridge eth0
> Mar 24 20:14:55 majuan ovs-vswitchd: 00065|ofproto|INFO|datapath ID
> changed to 000018a905162754
> Mar 24 20:14:55 majuan ovs-brcompatd: 00004|brcompatd|INFO|add-if eth0
> peth0: Success
> 
> 
> 
> 
> 
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org





--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail is 
solely property of the sender's organization. This mail communication is 
confidential. Recipients named above are obligated to maintain secrecy and are 
not permitted to disclose the contents of this communication to others.
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the originator of the 
message. Any views expressed in this message are those of the individual sender.
This message has been scanned for viruses and Spam by ZTE Anti-Spam system.
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to