make openvswitch compatible with oVirt (tight with brctl)

在openvswitch网站的首页, 指出openvswitch已经整合到了oVirt管理软件, 但是实际使用oVirt时, 发现并没有这样, (我用的是oVirt 3.4.3).

It has also been integrated into many virtual management systems including OpenStack, openQRM, OpenNebula and oVirt. 

额外在管理机和HOST节点安装openvswitch, 并且将ovirtmgmt网桥改成openvswitch管理后, oVirt管理平台里面, HOST节点的EVENT显示ovirtmgmt没有绑定到任何接口,

Network ovirtmgmt is not attached to any interface on host 150.

说明oVirt还在使用brctl来查看接口信息. 使用brctl查看, 确实如此.

[root@150 openvswitch-1.9.3]# brctl show
bridge name     bridge id               STP enabled     interfaces
ovirtmgmt               /sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
0000.00221960778f       no

openvswitch的INSTALL.bridge 安装说明文件指出, 可以将openvswitch安装为替换brctl的模式, 但是不建议这么做, 仅仅当应用程序和brctl绑定使用时才需要这么做, 详细的内容如下 :

[root@150 openvswitch-1.9.3]# cat INSTALL.bridge
              Replacing a Linux Bridge with Open vSwitch
              ==========================================

This file documents how Open vSwitch may be used as a drop-in
replacement for a Linux kernel bridge in an environment that includes
elements that are tightly tied to the Linux bridge tools
(e.g. "brctl") and architecture.  We recommend directly using the
management tools provided with Open vSwitch rather than these
compatibility hooks for environments that are not tightly tied to the
Linux bridging tools; they are more efficient and better reflect the
actual operation and status.

Installation Procedure
----------------------

The procedure below explains how to use the Open vSwitch bridge
compatibility support.  This procedure is written from the perspective
of a system administrator manually loading and starting Open vSwitch
in bridge compatibility mode, but of course in practice one would want
to update system scripts to follow these steps.  If you do edit your
system configuration files to start Open vSwitch at boot time, make
sure that it starts up before any bridge configuration (e.g. before
any calls to "brctl" or "ifup" of any bridge interfaces), to ensure
that the Open vSwitch kernel modules are loaded before the Linux
kernel bridge module.

1. Build, install, and start up the Open vSwitch kernel modules and
   userspace programs as described in INSTALL.

   It is important to run "make install", because some Open vSwitch
   programs expect to find files in locations selected at installation
   time.  The instructions below assume that files are installed in
   their default locations, under /usr/local.

2. Load the brcompat kernel module (which was built in step 1), e.g.:

      % insmod datapath/linux/brcompat.ko

   (openvswitch.ko should already have been loaded.)

3. Start ovs-brcompatd:

      % ovs-brcompatd --pidfile --detach

   (ovsdb-server and ovs-vswitchd should already have been loaded.)

4. Now you should be able to manage the Open vSwitch using brctl and
   related tools.  For example, you can create an Open vSwitch bridge,
   add interfaces to it, then print information about bridges with the
   commands:

      % brctl addbr br0
      % brctl addif br0 eth0
      % brctl addif br0 eth1
      % brctl show

   Each of these commands actually uses or modifies the Open vSwitch
   configuration database, then notifies the ovs-vswitchd daemon of
   the change.  For example, after executing the commands above
   starting from an empty configuration file, "ovs-vsctl list-ports
   br0" should show that bridge br0 contains two ports, eth0 and eth1.

接下来按照openvswitch的提示, 加载brcompat模块, 并使用brctl来管理看看.

[root@150 openvswitch-1.9.3]# locate brcompat.ko
/lib/modules/2.6.32-431.20.3.el6.x86_64/extra/openvswitch/brcompat.ko
[root@150 openvswitch-1.9.3]# lsmod|grep brcom
[root@150 openvswitch-1.9.3]# insmod /lib/modules/2.6.32-431.20.3.el6.x86_64/extra/openvswitch/brcompat.ko
[root@150 openvswitch-1.9.3]# lsmod|grep brcom
brcompat                5905  0
openvswitch            96678  1 brcompat

告警了, 这个兼容性将来要移除了.

[root@150 openvswitch-1.9.3]# ovs-brcompatd --pidfile --detach
2014-08-06T00:23:14Z|00001|brcompatd|WARN|Bridge compatibility is deprecated and may be removed no earlier than February 2013
[root@150 openvswitch-1.9.3]# ps -ewf|grep ovs-b
root     18676     1  0 08:23 ?        00:00:00 ovs-brcompatd --pidfile --detach

现在使用brctl查看网桥信息, 还是有问题, 和一开始一样.

[root@150 openvswitch-1.9.3]# brctl show
bridge name     bridge id               STP enabled     interfaces
;vdsmdummy;             8000.000000000000       no
ovirtmgmt               /sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
0000.00221960778f       no

使用ovs-vsctl没有问题.

[root@150 openvswitch-1.9.3]# ovs-vsctl show
fb8f1987-c908-4a8f-bc2c-1f8c19f034fc
    Bridge ovirtmgmt
        Port ovirtmgmt
            Interface ovirtmgmt
                type: internal
        Port "em1"
            Interface "em1"
    ovs_version: "1.9.3"

使用brctl 添加一个网桥, 添加的网桥, 查看信息还是有问题.

[root@150 openvswitch-1.9.3]# brctl addbr br1
[root@150 openvswitch-1.9.3]# brctl show
bridge name     bridge id               STP enabled     interfaces
;vdsmdummy;             8000.000000000000       no
br1             /sys/class/net/br1/bridge: No such file or directory
/sys/class/net/br1/bridge: No such file or directory
/sys/class/net/br1/bridge: No such file or directory
/sys/class/net/br1/bridge: No such file or directory
/sys/class/net/br1/bridge: No such file or directory
/sys/class/net/br1/bridge: No such file or directory
/sys/class/net/br1/bridge: No such file or directory
/sys/class/net/br1/bridge: No such file or directory
/sys/class/net/br1/bridge: No such file or directory
/sys/class/net/br1/bridge: No such file or directory
/sys/class/net/br1/bridge: No such file or directory
/sys/class/net/br1/bridge: No such file or directory
0000.a28e5dc5ae47       no
ovirtmgmt               /sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
/sys/class/net/ovirtmgmt/bridge: No such file or directory
0000.00221960778f       no

看样子现在要用oVirt的话, 还是用bridge-utils带的brctl吧.

时间: 2024-11-08 21:16:22

make openvswitch compatible with oVirt (tight with brctl)的相关文章

ovs 实用案例

建立gre,xvlan:http://networkstatic.net/configuring-vxlan-and-gre-tunnels-on-openvswitch/ vm之间通过gre通信:http://openvswitch.org/support/config-cookbooks/port-tunneling/ 通过brctl show以及  virsh domiflist   ID  查找出tap的名字

oVirt don't support OpenVSwitch now (2014-07-30)

oVirt Node Open vSwitch Integration Summary This feature will add support for Open vSwitch (and potentially Quantum/Neutron) to oVirt Node. Owner Name: Ryan Barry Email: rbarry AT redhat DOT com IRC: rbarry Current status Development 0% complete Link

docker cann't use openvswitch bridge direct, but can use bridge-utils managed bridge in OVS-VSCTL managed bridge

我这里是在CentOS 6.5 x64下测试的, 没有在7的环境下测试. openvswitch是一个不错的开源虚拟交换软件, 但是目前docker还不支持直接使用ovs管理的网桥, 可能是还没有实现ovs的接口. 在centos下, 目前docker支持bridge-utils包管理的网桥, 也就是常用的brctl. 如果要使用openvswitch, 可以这么来做, 1. 以无网络方式启动container, 这样的话可以避开docker来调用一些网桥相关的接口配置网络而导致报错. 2. 使

oVirt 3.4.3-1 LiveCD ISO based on CentOS 6.5

因为从ovirt yum安装部署ovirt, 由于engine-setup更新包后导致ovirt-engine url无法打开, 可能是更新后的BUG, 数据库日志也报了大量的函数不存在的错误.  准备试一试oVirt打包的LiveCD ISO, 可以下载3.4.2或者最新的3.4.3-1 http://resources.ovirt.org/pub/ovirt-3.4/iso/ 3.4.3-1的版本是基于CentOS 6.5封装的. 因为oVirt首页也只有3.4.2的release note

oVirt quick start guide

1. 规划网络和存储 管理网络 存储网络 fence网络 虚拟机网络 存储(可选nfs, fc, iscsi, glusterfs), 推荐使用glusterfs. 2. 设计存储HA glusterfs挂载地址, HA. 会话同步. 3. 部署引擎和报告节点 4. 部署计算节点 5. 管理存储域 6. 创建虚拟机 7. 管理虚拟机 [参考] 1. 引擎和报告的安装 http://blog.163.com/digoal@126/blog/static/1638770402014628114756

oVirt usage attention

汇总一下oVirt的使用注意事项. 1. 数据库相关 http://blog.163.com/digoal@126/blog/static/1638770402014628114756319/ http://blog.163.com/digoal@126/blog/static/163877040201462942137640/ 1.1 建议配置ovirt engine时, 数据库用户提前改成超级用户 1.2 建议数据库的owner是连接用户 1.3 不建议自建schema, 建议使用publi

Implementing Cross-Browser Compatible Smart Navigation Features

Implementing Cross-Browser Compatible Smart Navigation Features by Damon Armstrong Rating: SmartNavigation is a feature built into ASP.NET that makes postbackssmoother by remembering the page scroll position, retaining elementfocus, reducing screen f

UVa 10081 Tight Words (DP)

10081 - Tight Words Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=115&page=show_problem&problem=1022 思路:长度为i的串,如果其末尾数是j,那么这样的串的个数必为长为i-1的串的,尾数为j-1,j,j+1三种情况的数目之和(在边界范围内) 完整代码: /*0.0

php方法重写:Declaration of should be compatible with that

  如果你碰到php 方法重写,参数不同,报错: Declaration of should be compatible with that这种问题不防进入参考一下解决办法吧. 上网搜索了一下,发现许多帖子基本都抄的一样,说什么这是由于 php5.3版本后,要求继承类必须在父类之后定义,如果父类定义在前,继承类在后,就不会出现这个错误.尤其是http://bugs.php.net/bug.php?id=46851上面还煞有介事的给出了正反例: 代码如下   <?php // this code