how to persist network configuration after devstack installation ?

asked 2019-06-28 09:58:29 -0500

hpf97 gravatar image

Hi all,

We are facing a stupid problem after devstack installation. Everything's ok (can access instances, instances can joint the public network, ...) but when we reboot the host machine, network configuration done during the installation is lost; whereas in the same time, all openstack services are correctly turned off and started when the host is up.

Our installation is on Ubuntu 18.04LTS + latest devstack with Horizon and Murano. We know that it is not for production, but we would like to demonstrate what could be done with OpenStack when we do not have internet connection (and no time to reinstall it).

So someone know how to persist this network configuration ?

thx a lot for your help

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2019-07-03 02:02:50 -0500

hpf97 gravatar image

updated 2019-07-04 08:15:22 -0500

Thx Bernd for this information.

We tried this investigation without success, but we are going to have a deeper look on the content of /devstack/<timestamp> to see if there are other commands to launch to recover the network configuration. But it is a good startfor us.

If somebody else has other ideas, they are welcome.

So, we dig a bit in the problem. On Bernd recommandations we did a script with what seems missing :

#!/usr/bin/env bash
sudo losetup -f --show --direct-io=on /opt/stack/data/stack-volumes-default-backing-file
sudo losetup -f --show --direct-io=on /opt/stack/data/stack-volumes-lvmdriver-1-backing-file
sudo ip -6 addr replace 2001:db8::2/64 dev br-ex
sudo ip -6 route replace fdfa:1a2f:da66::/56 via 2001:db8::1 dev br-ex
sudo ip -f inet r replace default via dev br-ex
sudo ip -f inet r replace default via dev br-ex
sudo route del -net gw netmask dev enp0s31f6
sudo ip addr replace dev enp0s31f6
# The following command fails telling no permission to do it
 sudo ip addr replace fe80::3e52:82ff:fe8e:85a7/64 dev enp0s31f6

sudo systemctl restart devstack@*

but when we look with ovs-vsctl, there is still a problem between the bridge and the physical nic :

Bridge br-ex
    Controller "tcp:"
        is_connected: true
    fail_mode: secure
    Port phy-br-ex
        Interface phy-br-ex
            type: patch
            options: {peer=int-br-ex}
    Port "enp0s31f6"
        Interface "enp0s31f6"
            error: "**could not add network device enp0s31f6 to ofproto (Device or resource busy)**"
    Port br-ex
        Interface br-ex
            type: internal
            error: "**could not add network device br-ex to ofproto (File exists**)"
edit flag offensive delete link more

answered 2019-06-29 15:09:47 -0500

updated 2019-06-29 16:06:25 -0500

This may or may not be applicable to you, depending on your configuration:

After rebooting Devstack, search the log for commands to recreate volatile elements:

$ grep -e mount.*swift -e losetup -e "sudo ip.*br-ex" ~/devstack/<timestamp>

These commands are probably as follows:

1- remount the Swift filesystem

sudo mount -t xfs -o loop,noatime,nodiratime,nobarrier,logbufs=8 \
                   /opt/stack/data/swift/drives/images/swift.img \

2- recreate the LVM physical volumes for Cinder

sudo losetup -f --show /opt/stack/data/stack-volumes-default-backing-file
sudo losetup -f --show /opt/stack/data/stack-volumes-lvmdriver-1-backing-file

3- configure the external bridge

sudo ip addr add dev br-ex
sudo ip link set br-ex up

You can use /etc/fstab and netplan to persist the Swift mount and the br-ex config. Persisting the losetup commands is left as an exercise (i.e. I currently don’t know).

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-06-28 09:58:29 -0500

Seen: 553 times

Last updated: Jul 04 '19