[rdo-users] Packstack, Centos 8 and NetworkManager
YATIN KAREL
yatinkarel at gmail.com
Fri Jun 26 16:02:27 UTC 2020
Hi Bernd,
On Sun, Jun 7, 2020 at 7:38 AM Bernd Bausch <berndbausch at gmail.com> wrote:
> To install Ussuri, Packstack documentation[1] assumes Centos 8 or RHEL 8.
> However, it still wants me to disable NetworkManager. When I do that, the
> Packstack loses all network configuration when rebooting, since Centos 8
> relies on NetworkManager to manage all aspects of networking.
>
Feels like u didn't installed/enabled network-scripts when disabled
NetworkManager?, i pushed a PR[1] to add step to install network-scripts
explicitly on CentOS8.
[1] https://github.com/redhat-openstack/website/pull/1388
>
> Even after re-enabling NetworkManager and installing the NM OVS plugin,
> br-ex remains down. Admittedly, I am quite clueless regarding the
> management of OVS, with or without NetworkManager. Here are some of the
> things I did (I also followed instructions for connecting Packstack to the
> existing network[2]):
>
> $ *cat /etc/sysconfig/network-scripts/ifcfg-br-ex*
> NAME=br-ex
> DEVICE=br-ex
> DEVICETYPE=ovs
> TYPE=OVSBridge
> BOOTPROTO=static
> IPADDR=172.24.4.1
> PREFIX=24
> ONBOOT=yes
> $ *sudo nmcli d set br-ex managed yes*
> $ *sudo ip l set br-ex up*
> $ *nmcli d*
> DEVICE TYPE STATE CONNECTION
> ens3 ethernet connected ens3
> br-ex openvswitch disconnected --
> $ *sudo nmcli d connect br-ex*
> Error: Failed to add/activate new connection: Device class
> NMDeviceOvsInterface had no complete_connection method
>
NetworkManager does not work with ifcfg-* scripts for ovs-bridges[2], so if
you want to manage ovs bridges with NetworkManager need to use nmcli or
some other tool.
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1589869
> $ *sudo journalctl -u NetworkManager | grep br-ex*
> Jun 07 10:51:45 ...: <info> [1591494705.5163] manager: (br-ex): new Open
> vSwitch Interface device (/org/freedesktop/NetworkManager/Devices/2)
> Jun 07 10:51:45 ...: <info> [1591494705.5578] device (br-ex): state
> change: unmanaged -> unavailable (reason 'managed', sys-iface-state:
> 'external')
> Jun 07 10:51:45 ...: <info> [1591494705.5598] device (br-ex): carrier:
> link connected
> Jun 07 10:51:45 ...: <info> [1591494705.9112] manager: (br-ex): new Open
> vSwitch Port device (/org/freedesktop/NetworkManager/Devices/6)
> Jun 07 10:51:45 ...: <info> [1591494705.9686] manager: (br-ex): new Open
> vSwitch Bridge device (/org/freedesktop/NetworkManager/Devices/11)
> Jun 07 10:51:46 ...: <info> [1591494706.0306] device (br-ex): state
> change: unavailable -> disconnected (reason 'none', sys-iface-state:
> 'managed')
>
> Any guidance?
>
Either install/enable network-scripts or use nmcli to manage ovs bridges
with NetworkManager. I tried following for external network and it worked
for me.
# Install and Enable ovs plugin for NetworkManager
sudo dnf install -y NetworkManager-ovs
sudo systemctl restart NetworkManager
# Discover network configs for ens3
export IP=`ip r get 1.1.1.1 | awk '/dev/{print $7}' | tr -d '[[:space:]]'`
export NETMASK=`ip route show | grep $IP |cut -d" " -f1|cut -d"/" -f2 |tr
-d '[[:space:]]'`
# We need the gateway as we'll be reconfiguring the ens3 interface
export GATEWAY=`ip r get 1.1.1.1 | awk '/dev/{print $3}' | tr -d
'[[:space:]]'`
export MAC=`ip a show ens3|grep link/ether|awk '{print $2}' | tr -d
'[[:space:]]'`
# Delete ovs bridge created outside of NetworkManager
sudo ovs-vsctl del-br br-ex
sudo nmcli conn add type ovs-bridge conn.interface br-ex
sudo nmcli conn add type ovs-port conn.interface port0 master br-ex
sudo nmcli conn add type ovs-interface slave-type ovs-port conn.interface
br-ex master port0 ipv4.method manual ipv4.address $IP/$NETMASK
ipv4.gateway $GATEWAY ipv4.dns 8.8.8.8
# This didn't persist after reboot, need to find why and get it fixed some
way
sudo ovs-vsctl set bridge br-ex other-config:hwaddr=$MAC
sudo nmcli conn add type ovs-port conn.interface port1 master br-ex
sudo nmcli conn add type ethernet conn.interface ens3 master port1
sudo nmcli conn up ovs-slave-ens3
# to persist mac on ovs bridge with reboots
sudo tee /etc/NetworkManager/dispatcher.d/25-ovs-br-ex <<EOF
#!/bin/sh
# This is a NetworkManager dispatcher / networkd-dispatcher script for
# ovs to set mac address for slave
# For NetworkManager consider only up/down events
[ 0 -ge 2 ] && [ "" != "up" ] && exit 0
if [ "\$DEVICE_IFACE" == "br-ex" ]; then
export MAC=\$(ip a show ens3|grep link/ether|awk '{print \$2}' | tr -d
'[[:space:]]')
ovs-vsctl set bridge br-ex other-config:hwaddr=\$MAC
fi
exit 0
EOF
sudo chmod +x /etc/NetworkManager/dispatcher.d/25-ovs-br-ex
Ensure you have console access to the packstack vm as in case of
misconfiguration of network ssh connection will be lost.
> [1] https://www.rdoproject.org/install/packstack/
> [2]
> https://www.rdoproject.org/networking/neutron-with-existing-external-network
>
>
> _______________________________________________
> users mailing list
> users at lists.rdoproject.org
> http://lists.rdoproject.org/mailman/listinfo/users
>
> To unsubscribe: users-unsubscribe at lists.rdoproject.org
>
Thanks and Regards
Yatin Karel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rdoproject.org/pipermail/users/attachments/20200626/589ad4ed/attachment.html>
More information about the users
mailing list