在 ubuntu20.04 上安装 devstack xena 失败(arping br-ex 错误)

在 ubuntu20.04 上安装 devstack xena 失败(arping br-ex 错误)

在干净的 ubuntu20.04 云映像上安装 devstack stable/xena 时遇到问题(由 virt-install 实例化的 VM,具有 2 个接口:ens3(HostPC virbr0 上的 192.168.122.36)用于公共接口,ens4(192.168.100.100 主机 virbr1)用于管理)

devstack 安装几乎要结束了,但在 br-ex 上的 arping 检查时退出:stack.sh.log 的尾部:

2022-02-02 21:52:21.085 | +lib/neutron-legacy:_move_neutron_addresses_route:671 IP_BRD ='192.168.122.36/24 brd 192.168.122.255'
2022-02-02 21:52:21.093 | +lib/neutron-legacy:_move_neutron_addresses_route:673'['192.168.122.1'!='''']'
2022-02-02 21:52:21.101 | +lib/neutron-legacy:_move_neutron_addresses_route:674 ADD_DEFAULT_ROUTE ='sudo ip -f inet r 替换默认值 via 192.168.122.1 dev br-ex'
2022-02-02 21:52:21.109 | +lib/neutron-legacy:_move_neutron_addresses_route:677 [[ True == \T\r\u\e ]]
2022-02-02 21:52:21.118 | +lib/neutron-legacy:_move_neutron_addresses_route:678 ADD_OVS_PORT ='sudo ovs-vsctl --may-exist add-port br-ex ens3'
2022-02-02 21:52:21.127 | +lib/neutron-legacy:_move_neutron_addresses_route:681 [[ False == \T\r\u\e ]]
2022-02-02 21:52:21.135 | +lib/neutron-legacy:_move_neutron_addresses_route:685 [[ 192.168.122.36/24 brd 192.168.122.255 != '' ]]
2022-02-02 21:52:21.143 | +lib/neutron-legacy:_move_neutron_addresses_route:686 IP_DEL ='sudo ip addr del 192.168.122.36/24 brd 192.168.122.255 dev ens3'
2022-02-02 21:52:21.153 | +lib/neutron-legacy:_move_neutron_addresses_route:687 IP_REPLACE ='sudo ip addr replace 192.168.122.36/24 brd 192.168.122.255 dev br-ex'
2022-02-02 21:52:21.164 | +lib/neutron-legacy:_move_neutron_addresses_route:688 IP_UP ='sudo ip link set br-ex up'
2022-02-02 21:52:21.172 | +lib/neutron-legacy:_move_neutron_addresses_route:689 [[ inet == \i\n\e\t ]]
2022-02-02 21:52:21.183 | ++lib/neutron-legacy:_move_neutron_addresses_route:690 awk'{打印$1;退出}'
2022-02-02 21:52:21.183 | ++lib/neutron-legacy:_move_neutron_addresses_route:690 echo 192.168.122.36/24 brd 192.168.122.255
2022-02-02 21:52:21.185 | ++lib/neutron-legacy:_move_neutron_addresses_route:690 grep -o -E'(.*)/'
2022-02-02 21:52:21.192 | ++lib/neutron-legacy:_move_neutron_addresses_route:690 cut -d / -f1
2022-02-02 21:52:21.202 | +lib/neutron-legacy:_move_neutron_addresses_route:690 IP=192.168.122.36
2022-02-02 21:52:21.210 | +lib/neutron-legacy:_move_neutron_addresses_route:691 ARP_CMD ='sudo arping -A -c 3 -w 5 -I br-ex 192.168.122.36'
2022-02-02 21:52:21.217 | +lib/neutron-legacy:_move_neutron_addresses_route:697 sudo ip addr del 192.168.122.36/24 brd 192.168.122.255 dev ens3
2022-02-02 21:52:21.236 | +lib/neutron-legacy:_move_neutron_addresses_route:697 sudo ip addr replace 192.168.122.36/24 brd 192.168.122.255 dev br-ex
2022-02-02 21:52:21.252 | +lib/neutron-legacy:_move_neutron_addresses_route:697 sudo ip link set br-ex up
2022-02-02 21:52:21.272 | +lib/neutron-legacy:_move_neutron_addresses_route:697 sudo ovs-vsctl --may-exist add-port br-ex ens3
2022-02-02 21:52:21.293 | +lib/neutron-legacy:_move_neutron_addresses_route:697 sudo ip -f inet r 通过 192.168.122.1 dev br-ex 替换默认值
2022-02-02 21:52:21.309 | +lib/neutron-legacy:_move_neutron_addresses_route:697 sudo arping -A -c 3 -w 5 -I br-ex 192.168.122.36
2022-02-02 21:52:24.316 | ARPING 192.168.122.36 来自 192.168.122.36 br-ex
2022-02-02 21:52:24.316 | 发送了 3 次探测 (3 次广播)
2022-02-02 21:52:24.316 | 收到 0 条回复
2022-02-02 21:52:24.341 | +lib/neutron-legacy:_move_neutron_addresses_route:1 exit_trap
2022-02-02 21:52:24.349 | +./stack.sh:exit_trap:521 本地 r=1
2022-02-02 21:52:24.359 | ++./stack.sh:exit_trap:522 作业-p
2022-02-02 21:52:24.367 | +./stack.sh:exit_trap:522 作业=
2022-02-02 21:52:24.376 | +./stack.sh:exit_trap:525 [[ -n '' ]]
2022-02-02 21:52:24.384 | +./stack.sh:exit_trap:531'['-f /tmp/tmp.WDApXUJF5c']'
2022-02-02 21:52:24.394 | +./stack.sh:exit_trap:532 rm /tmp/tmp.WDApXUJF5c
2022-02-02 21:52:24.407 | +./stack.sh:exit_trap:536 kill_spinner
2022-02-02 21:52:24.422 | +./stack.sh:kill_spinner:431'[' '!'-z' ']'
2022-02-02 21:52:24.430 | +./stack.sh:exit_trap:538 [[ 1 -ne 0 ]]
2022-02-02 21:52:24.441 | +./stack.sh:exit_trap:539 echo'退出时出错'
2022-02-02 21:52:24.441 | 退出时出错
2022-02-02 21:52:24.447 | +./stack.sh:exit_trap:541 类型 -p 生成子单元
2022-02-02 21:52:24.455 | +./stack.sh:exit_trap:542 generate-subunit 1643837814 930 失败
2022-02-02 21:52:24.807 | +./stack.sh:exit_trap:544 [[ -z /opt/stack/logs ]]
2022-02-02 21:52:24.814 | +./stack.sh:exit_trap:547 /usr/bin/python3.8 /home/stack/devstack/tools/worlddump.py -d /opt/stack/logs
2022-02-02 21:52:25.437 | +./stack.sh:exit_trap:556 退出 1

local.conf 的网络部分:

主机 IP=192.168.122.36
服务主机=192.168.122.36
#HOST_IPV6=2001:db8::7

## 中子选项
Q_USE_SECGROUP=真
#FLOATING_RANGE="192.168.122.0/24"
#Q_FLOATING_ALLOCATION_POOL=开始=192.168.122.240,结束=192.168.122.254
浮动范围=192.168.122.224/27
IPV4_ADDRS_SAFE_TO_USE="10.0.0.0/22"
PUBLIC_NETWORK_GATEWAY="192.168.122.1"
公共接口=ens3

# 尝试 LinuxBridge,因为 ovs 在 $HOST_IP 上对 br-ex 给出了 arping 错误
#Q_USE_PROVIDERNET_FOR_PUBLIC=真
#Q_AGENT=linuxbridge
#LB_PHYSICAL_INTERFACE=ens3
#公共物理网络=默认
#LB_INTERFACE_MAPPINGS=默认值:ens3

# Open vSwitch 提供商网络配置
Q_USE_PROVIDERNET_FOR_PUBLIC=真
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_BRIDGE=br-ex
OVS_BRIDGE_MAPPINGS=公共:br-ex

(尝试使用 linuxbridge 作为 OVS 的解决方法,但仍然要定义 br-ex 并得到更严重的错误(中子无法启动)

我最后的网络配置似乎没问题

堆栈@devstackxena〜/ devstack$ ip 链接
1:lo:<LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc 无队列状态未知模式默认组默认 qlen 1000
    链路/环回 00:00:00:00:00:00 brd 00:00:00:00:00:00
2:ens3:<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master ovs 系统状态 UP 模式 DEFAULT 组默认 qlen 1000
    链接/以太 52:54:00:ed:c1:f2 brd ff:ff:ff:ff:ff:ff
3:ens4:<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel 状态 UP 模式 DEFAULT 组默认 qlen 1000
    链接/以太 52:54:00:28:b9:e7 brd ff:ff:ff:ff:ff:ff
27:ovs 系统:<BROADCAST,MULTICAST> mtu 1500 qdisc noop 状态 DOWN 模式 DEFAULT 组默认 qlen 1000
    链接/以太 4a:4d:4c:08:59:d1 brd ff:ff:ff:ff:ff:ff
28:br-int:<BROADCAST,MULTICAST> mtu 1500 qdisc noop 状态 DOWN 模式 DEFAULT 组默认 qlen 1000
    链接/以太 7a:0c:6d:1c:17:49 brd ff:ff:ff:ff:ff:ff
29:br-ex:<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc 无队列状态未知模式默认组默认 qlen 1000
    链路/以太 c6:1e:0f:72:91:4c brd ff:ff:ff:ff:ff:ff
堆栈@devstackxena〜/ devstack$ ip a
1:lo:<LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc 无队列状态未知组默认 qlen 1000
    链路/环回 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 范围主机 lo
       valid_lft 永远 preferred_lft 永远
    inet6 ::1/128 范围主机
       valid_lft 永远 preferred_lft 永远
2:ens3:<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master ovs 系统状态 UP 组默认 qlen 1000
    链接/以太 52:54:00:ed:c1:f2 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5054:ff:feed:c1f2/64 范围链接
       valid_lft 永远 preferred_lft 永远
3:ens4:<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel 状态 UP 组默认 qlen 1000
    链接/以太 52:54:00:28:b9:e7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.100/24 范围全局 ens4
       valid_lft 永远 preferred_lft 永远
    inet6 2001:db8:ca2:3:5054:ff:fe28:b9e7/64 范围全局动态 mngtmpaddr
       valid_lft 3269秒 preferred_lft 3269秒
    inet6 fe80::5054:ff:fe28:b9e7/64 范围链接
       valid_lft 永远 preferred_lft 永远
27:ovs 系统:<广播,多播> mtu 1500 qdisc noop 状态 DOWN 组默认 qlen 1000
    链接/以太 4a:4d:4c:08:59:d1 brd ff:ff:ff:ff:ff:ff
28:br-int:<BROADCAST,MULTICAST> mtu 1500 qdisc noop 状态 DOWN 组默认 qlen 1000
    链接/以太 7a:0c:6d:1c:17:49 brd ff:ff:ff:ff:ff:ff
29:br-ex:<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc 无队列状态未知组默认 qlen 1000
    链路/以太 c6:1e:0f:72:91:4c brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.36/24 brd 192.168.122.255 范围全局 br-ex
       valid_lft 永远 preferred_lft 永远
    inet6 fe80::c41e:fff:fe72:914c/64 范围链接
       valid_lft 永远 preferred_lft 永远

ovs 配置:

堆栈@devstackxena〜/ devstack$ sudo ovs-vsctl 显示
2448b59c-19b3-4043-ab1f-c3bbc0e66102
    管理器“ptcp:6640:127.0.0.1”
        是否已连接:true
    桥梁 br-int
        fail_mode:安全
        港口 br-int
            接口 br-int
                类型:内部
    桥梁 br-ex
        端口 ens3
            接口 ens3
        br-ex 港口
            接口 br-ex
                类型:内部
    ovs_version:“2.13.3”
堆栈@devstackxena〜/ devstack$ ip 路由
默认通过 192.168.122.1 dev br-ex
192.168.100.0/24 dev ens4 proto 内核范围链接 src 192.168.100.100
192.168.122.0/24 dev br-ex proto 内核范围链接 src 192.168.122.36

br-ex 上的 tcpdump arp:

堆栈@devstackxena~$ sudo tcpdump -i br-ex -n icmp 或 arp
tcpdump:抑制详细输出,使用 -v 或 -vv 进行完整协议解码
监听 br-ex,链路类型 EN10MB(以太网),捕获大小 262144 字节
12:09:52.568287 ARP,请求 who-has 192.168.122.37 告诉 192.168.122.1,长度 28
12:09:53.592292 ARP,请求 who-has 192.168.122.37 告诉 192.168.122.1,长度 28
12:10:18.892563 ARP,请求 who-has 192.168.122.36 (ff:ff:ff:ff:ff:ff) 告诉 192.168.122.36,长度 28
12:10:19.892728 ARP,请求 who-has 192.168.122.36 (ff:ff:ff:ff:ff:ff) 告诉 192.168.122.36,长度 28
12:10:20.892764 ARP,请求 who-has 192.168.122.36 (ff:ff:ff:ff:ff:ff) 告诉 192.168.122.36,长度 28
12:10:48.145743 IP 192.168.122.1 > 192.168.122.36:ICMP 回显请求,ID 33715,序列号 0,长度 28
12:10:48.145850 IP 192.168.122.36 > 192.168.122.1:ICMP 回显答复,ID 33715,序列号 0,长度 28

arping 收到 192.168.122.36 但未收到回复(这是我对 devstack Exit 的解释)。

不确定额外的 192.168.122.37 来自哪里,这个 IP 在虚拟机中不存在。(主机上没有其他虚拟机)我假设可以 arping 自己的 IP?(这就是 devstack 脚本正在尝试的)

感谢任何指点和想法

答案1

我刚刚遇到了同样的问题,并追踪到这是这个错误:https://github.com/iputils/iputils/issues/247. 因此,如果是 iputils-arping,请手动安装最新版本,或者例如创建包装器脚本并更正退出代码

相关内容