1.6. 为备份配置 Open vSwitch (OVS)接口


如果环境中使用 Open vSwitch (OVS)网桥,则必须手动配置 OVS 接口,然后才能创建 undercloud 或 control plane 节点的备份。恢复过程使用此信息来恢复网络接口。

流程

  • /etc/rear/local.conf 文件中,使用以下格式添加 NETWORKING_PREPARATION_COMMANDS 参数:

    NETWORKING_PREPARATION_COMMANDS=('<command_1>' '<command_2>' ...')
  • <command_1& gt ; 和 <command_ 2> 替换为配置网络接口的命令。例如,您可以添加 ip link add br-ctlplane type bridge 命令,以创建 control plane 网桥,或者添加 ip link set eth0 up 命令,将 eth0 的状态更改为 up。您可以根据网络配置在参数中添加更多命令。

    例如,如果 undercloud 具有以下配置:

    $ ip -4 addr ls br-ctlplane
    8: br-ctlplane: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 172.16.9.1/24 brd 172.16.9.255 scope global br-ctlplane
    valid_lft forever preferred_lft forever
    
    $ sudo ovs-vsctl show
    ...
    Bridge br-ctlplane
    Controller "tcp:127.0.0.1:6633"
    is_connected: true
    fail_mode: secure
    datapath_type: system
    Port eth0
    Interface eth0
    Port br-ctlplane
    Interface br-ctlplane
    type: internal
    Port phy-br-ctlplane
    Interface phy-br-ctlplane
    type: patch
    options:
    
    {peer=int-br-ctlplane}
    ...

    NETWORKING_PREPARATION_COMMANDS 参数的格式如下:

    NETWORKING_PREPARATION_COMMANDS=('ip link add br-ctlplane type bridge' 'ip link set br-ctlplane up' 'ip link set eth0 up' 'ip link set eth0 master br-ctlplane' 'ip addr add 172.16.9.1/24 dev br-ctlplane')
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部