network configuration is not restored after host reboot

Bug #1011640 reported by Yoann Dubreuil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Chuck Short
nova (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

After rebooting a host, nova-compute fails to restart guests VM because the interface used to create vlan is not UP. In our case, this interface is not connected to a physical network and doesn't have an IP address, so it's not configured on boot.

It could be good to start nova-network even if vlan interfaces cannot be set up. Here, it crashes while trying to put a vlan interface UP, as you can see in the attached log file

For other people eventually affected by the problem, i initially wrote this script to manually configure network so nova-network can start successfully

#!/bin/sh

add_network() {
    BR=br$1
    VLAN=vlan$1
    LAN=$2
    BCAST=$3
    vconfig add eth1 $1
    brctl addbr $BR
    brctl setfd $BR 0
    brctl stp $BR off
    ip link set $BR up
    ip link show dev $BR
    brctl addif $BR $VLAN
    ip addr show dev $BR scope global
    ip addr add "$LAN" brd "$BCAST" dev $BR
}

vconfig set_name_type VLAN_PLUS_VID_NO_PAD

add_network 100 "172.16.0.4/24" "172.16.0.255"
add_network 101 "172.16.1.4/24" "172.16.1.255"
add_network 102 "172.16.2.4/24" "172.16.2.255"
add_network 103 "172.16.3.4/24" "172.16.3.255"
add_network 104 "172.16.4.4/24" "172.16.4.255"

Revision history for this message
Yoann Dubreuil (ydubreuil) wrote :

Ok,

description: updated
Robie Basak (racb)
Changed in nova (Ubuntu):
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Chuck Short (zulcss)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/10607
Committed: http://github.com/openstack/nova/commit/eab5851b0b55c4230cc11460f9efc6b617ae2e68
Submitter: Jenkins
Branch: master

commit eab5851b0b55c4230cc11460f9efc6b617ae2e68
Author: Chuck Short <email address hidden>
Date: Tue Jul 31 11:49:58 2012 -0400

    Add check exit codes for vlans

    Add check_exit_code to check the ip address
    creation in ensure_vlan.

    Ignores error code '2' and '0' and '254'
    from iproute2, which means the address
    has been added or removed.

    A further audit of return codes will come later.

    LP: #1011640

    Change-Id: Ie95b106446c9f136fa079d95df7a14fe50046696
    Signed-off-by: Chuck Short <email address hidden>

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → folsom-3
status: Fix Committed → Fix Released
Chuck Short (zulcss)
Changed in nova (Ubuntu):
status: New → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-3 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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