devstack network setup failed

Bug #1469596 reported by asdfsx
46
This bug affects 7 people
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
=============================_move_neutron_addresses_route=========start==============
+ [[ -n eth0 ]]
+ [[ -n br-ex ]]
++ ip -4 a s dev eth0
++ awk '/inet/ { print $2, $3, $4; exit }'
+ local 'IP_BRD=192.168.2.152/24 brd 192.168.2.255'
++ ip r
++ awk '/default.+eth0/ { print $3; exit }'
+ local DEFAULT_ROUTE_GW=192.168.2.1
+ local ADD_OVS_PORT=
+ '[' 192.168.2.1 '!=' '' ']'
+ ADD_DEFAULT_ROUTE='sudo ip r replace default via 192.168.2.1 dev br-ex'
+ [[ 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/install/devstack/tools/worlddump.py -d /opt/stack/logs
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_addresses_route.
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.

Revision history for this message
Damien BRIENS (dbriens) wrote :

the bug is still there...

Shi Yan (yanshi-403)
description: updated
Changed in devstack:
assignee: nobody → Shinobu Kinjo (shinobu-kj)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/242702

Changed in devstack:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/242721

Revision history for this message
Toshikazu Ichikawa (ichikawa-toshikazu) wrote :

I hit this bug with CentOS 7.1. It doesn't affect with Ubuntu 14.04.

tags: added: liberty-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/242721
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=f95315b6ea56b3f2cb18caeac734dd15e6704b93
Submitter: Jenkins
Branch: master

commit f95315b6ea56b3f2cb18caeac734dd15e6704b93
Author: Shinobu KINJO <email address hidden>
Date: Sat Nov 7 10:21:08 2015 +0900

    Ensure link is set to up, when moving IP addresses across interfaces.

     - To add, initialize and set up a valiable named IP_UP
     - To bring up interface after moving IP to OVS bridge

    Change-Id: I70f5974c115be6f7e7422a9a325f36cf3b71455a
    Closes-Bug: #1469596

Changed in devstack:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/263065

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/liberty)

Reviewed: https://review.openstack.org/263065
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=0387d1f95101d83745e011e088a15d6a2cf0d69b
Submitter: Jenkins
Branch: stable/liberty

commit 0387d1f95101d83745e011e088a15d6a2cf0d69b
Author: Shinobu KINJO <email address hidden>
Date: Sat Nov 7 10:21:08 2015 +0900

    Ensure link is set to up, when moving IP addresses across interfaces.

     - To add, initialize and set up a valiable named IP_UP
     - To bring up interface after moving IP to OVS bridge

    Change-Id: I70f5974c115be6f7e7422a9a325f36cf3b71455a
    Closes-Bug: #1469596
    (cherry picked from commit f95315b6ea56b3f2cb18caeac734dd15e6704b93)

tags: added: in-stable-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on devstack (master)

Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https://review.openstack.org/242702
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.