devstack network setup failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
devstack |
Fix Released
|
Undecided
|
Shinobu Kinjo |
Bug Description
I have a physical network interface named "eth0"
and in my local.conf:
Everytime I execute the stack.sh, it failed caused by the following problem
nohup.log
=======
+ [[ -n eth0 ]]
+ [[ -n br-ex ]]
++ ip -4 a s dev eth0
++ awk '/inet/ { print $2, $3, $4; exit }'
+ local 'IP_BRD=
++ ip r
++ awk '/default.+eth0/ { print $3; exit }'
+ local DEFAULT_
+ local ADD_OVS_PORT=
+ '[' 192.168.2.1 '!=' '' ']'
+ ADD_DEFAULT_
+ [[ True == \T\r\u\e ]]
+ ADD_OVS_PORT='sudo ovs-vsctl --may-exist add-port br-ex eth0'
+ sudo ip addr del 192.168.2.152/24 brd 192.168.2.255 dev eth0
+ sudo ip addr add 192.168.2.152/24 brd 192.168.2.255 dev br-ex
+ sudo ovs-vsctl --may-exist add-port br-ex eth0
+ sudo ip r replace default via 192.168.2.1 dev br-ex
RTNETLINK answers: Network is unreachable
+ exit_trap
+ local r=2
++ jobs -p
+ jobs=
+ [[ -n '' ]]
+ kill_spinner
+ '[' '!' -z '' ']'
+ [[ 2 -ne 0 ]]
+ echo 'Error on exit'
Error on exit
+ [[ -z /opt/stack/logs ]]
+ /opt/stack/
sh: 1: kill: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or
kill -l [exitstatus]
+ exit 2
"sudo ip r replace default via 192.168.2.1 dev br-ex" failed cause "RTNETLINK answers: Network is unreachable"
I find the command is in script lib/neutron-legacy, in function _move_neutron_
Then I modify the command, add "sudo if link set br-ex up" before "sudo ip r replace default via 192.168.2.1 dev br-ex"
I modify the last line of the function like this:
sudo ip addr del $IP_BRD dev $from_intf; sudo ip addr add $IP_BRD dev $to_intf; sudo ip link set $to_intf up; $ADD_OVS_PORT; $ADD_DEFAULT_ROUTE
And it works for me.
description: | updated |
Changed in devstack: | |
assignee: | nobody → Shinobu Kinjo (shinobu-kj) |
the bug is still there...