Ask Your Question
0

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
0

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/stack.sh.log.<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 192.168.50.1 dev br-ex
sudo ip -f inet r replace default via 192.168.50.1 dev br-ex
sudo route del -net 192.168.50.0 gw 0.0.0.0 netmask 255.255.255.0 dev enp0s31f6
sudo ip addr replace 192.168.50.1/24 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:127.0.0.1:6633"
        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
0

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 stack.sh log for commands to recreate volatile elements:

$ grep -e mount.*swift -e losetup -e "sudo ip.*br-ex" ~/devstack/stack.sh.log.<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 \
                   /opt/stack/data/swift/drives/sdb1

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 172.24.4.1/24 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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 74 times

Last updated: Jul 04