<div dir="ltr"><div><div>Hi Bernd,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 7, 2020 at 7:38 AM Bernd Bausch <<a href="mailto:berndbausch@gmail.com">berndbausch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  

    
  
  <div>
    <p>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. <br></p></div></blockquote><div>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.</div><div><br></div><div>[1] <a href="https://github.com/redhat-openstack/website/pull/1388">https://github.com/redhat-openstack/website/pull/1388</a></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p>
      <br>
      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]):<br>
      <br>
      <tt>$ <font color="#0000ff"><b>cat
            /etc/sysconfig/network-scripts/ifcfg-br-ex</b></font></tt><tt><br>
      </tt><tt>NAME=br-ex</tt><tt><br>
      </tt><tt>DEVICE=br-ex</tt><tt><br>
      </tt><tt>DEVICETYPE=ovs<br>
        TYPE=OVSBridge</tt><tt><br>
      </tt><tt>BOOTPROTO=static</tt><tt><br>
      </tt><tt>IPADDR=172.24.4.1</tt><tt><br>
      </tt><tt>PREFIX=24</tt><tt><br>
      </tt><tt>ONBOOT=yes</tt><tt><br>
      </tt><tt><tt>$ <font color="#0000ff"><b>sudo nmcli d set br-ex
              managed yes</b><tt><br>
              $ <b>sudo ip l set br-ex up</b></tt><tt><br>
            </tt></font></tt>$ <b><font color="#0000ff">nmcli d</font></b></tt><tt><br>
      </tt><tt>DEVICE      TYPE         STATE         CONNECTION</tt><tt><br>
      </tt><tt>ens3        ethernet     connected     ens3</tt><tt><br>
      </tt><tt>br-ex       openvswitch  disconnected  --</tt><tt><br>
      </tt><tt>$ <b><font color="#0000ff">sudo nmcli d connect br-ex</font></b></tt><tt><br>
      </tt><tt><tt>Error: Failed to add/activate new connection: Device
          class NMDeviceOvsInterface had no complete_connection method<br></tt></tt></p></div></blockquote><div><br></div><div>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.<br></div><div><br></div><div>[2] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1589869">https://bugzilla.redhat.com/show_bug.cgi?id=1589869</a></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p><tt><tt>
          $ <b><font color="#0000ff">sudo journalctl -u NetworkManager
              | grep br-ex</font></b></tt><tt><br>
        </tt><tt></tt>Jun 07 10:51:45 ...: <info> 
        [1591494705.5163] manager: (br-ex): new Open vSwitch Interface
        device (/org/freedesktop/NetworkManager/Devices/2)<br>
        Jun 07 10:51:45 ...: <info>  [1591494705.5578] device
        (br-ex): state change: unmanaged -> unavailable (reason
        'managed', sys-iface-state: 'external')<br>
        Jun 07 10:51:45 ...: <info>  [1591494705.5598] device
        (br-ex): carrier: link connected<br>
        Jun 07 10:51:45 ...: <info>  [1591494705.9112] manager:
        (br-ex): new Open vSwitch Port device
        (/org/freedesktop/NetworkManager/Devices/6)<br>
        Jun 07 10:51:45 ...: <info>  [1591494705.9686] manager:
        (br-ex): new Open vSwitch Bridge device
        (/org/freedesktop/NetworkManager/Devices/11)<br>
        Jun 07 10:51:46 ...: <info>  [1591494706.0306] device
        (br-ex): state change: unavailable -> disconnected (reason
        'none', sys-iface-state: 'managed')<br>
      </tt><tt><br>
      </tt>Any guidance?<br></p></div></blockquote><div>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.</div><div><br></div><div> <div id="gmail-magicdomid1287" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn"># Install and Enable ovs plugin for NetworkManager</span></div><div id="gmail-magicdomid1236" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">sudo dnf install -y NetworkManager-ovs</span></div><div id="gmail-magicdomid1242" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">sudo systemctl restart NetworkManager</span></div><div id="gmail-magicdomid1289" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1312" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn"># Discover network configs for ens3</span></div><div id="gmail-magicdomid1172" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">export IP=`ip r get 1.1.1.1 | awk '/dev/{print $7}' | tr -d '[[:space:]]'`</span></div><div id="gmail-magicdomid1173" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">export NETMASK=`ip route show | grep $IP |cut -d" " -f1|cut -d"/" -f2 |tr -d '[[:space:]]'`</span></div><div id="gmail-magicdomid1174" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn"># We need the gateway as we'll be reconfiguring the ens3 interface</span></div><div id="gmail-magicdomid1175" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">export GATEWAY=`ip r get 1.1.1.1 | awk '/dev/{print $3}' | tr -d '[[:space:]]'`</span></div><div id="gmail-magicdomid1177" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">export MAC=`ip a show ens3|grep link/ether|awk '{print $2}' | tr -d '[[:space:]]'`</span></div><div id="gmail-magicdomid1348" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1313" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1347" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn"># Delete ovs bridge created outside of NetworkManager</span></div><div id="gmail-magicdomid1246" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">sudo ovs-vsctl del-br br-ex</span></div><div id="gmail-magicdomid1349" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1247" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1248" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">sudo nmcli conn add type ovs-bridge conn.interface br-ex</span></div><div class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">sudo nmcli conn add type ovs-port conn.interface port0 master br-ex</span></div><div class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">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</span></div><div id="gmail-magicdomid1181" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1182" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn"># This didn't persist after reboot, need to find why and get it fixed some way</span></div><div id="gmail-magicdomid1183" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">sudo ovs-vsctl set bridge br-ex other-config:hwaddr=$MAC</span></div><div id="gmail-magicdomid1184" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1185" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">sudo nmcli conn add type ovs-port conn.interface port1 master br-ex</span></div><div id="gmail-magicdomid1186" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">sudo nmcli conn add type ethernet conn.interface ens3 master port1</span></div><div id="gmail-magicdomid1187" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1188" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">sudo nmcli conn up ovs-slave-ens3</span></div><div id="gmail-magicdomid1041" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1189" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1217" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn"># to persist mac on ovs bridge with reboots</span></div><div id="gmail-magicdomid1192" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">sudo tee /etc/NetworkManager/dispatcher.d/25-ovs-br-ex <<EOF</span></div><div id="gmail-magicdomid1193" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">#!/bin/sh</span></div><div id="gmail-magicdomid1194" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn"># This is a NetworkManager dispatcher / networkd-dispatcher script for</span></div><div id="gmail-magicdomid1195" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn"># ovs to set mac address for slave</span></div><div id="gmail-magicdomid1196" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1197" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn"># For NetworkManager consider only up/down events</span></div><div id="gmail-magicdomid1198" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">[ 0 -ge 2 ] && [ "" != "up" ] && exit 0</span></div><div id="gmail-magicdomid1199" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1200" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">if [ "\$DEVICE_IFACE" == "br-ex" ]; then</span></div><div id="gmail-magicdomid1201" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">export MAC=\$(ip a show ens3|grep link/ether|awk '{print \$2}' | tr -d '[[:space:]]')</span></div><div id="gmail-magicdomid1202" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">ovs-vsctl set bridge br-ex other-config:hwaddr=\$MAC</span></div><div id="gmail-magicdomid1203" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">fi</span></div><div id="gmail-magicdomid1204" class="gmail-ace-line"><br></div><div id="gmail-magicdomid1205" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">exit 0</span></div><div id="gmail-magicdomid1206" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">EOF</span></div><div id="gmail-magicdomid1207" class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">sudo chmod +x /etc/NetworkManager/dispatcher.d/25-ovs-br-ex</span></div><div class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn"><br></span></div><div class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn"><br></span></div><div class="gmail-ace-line"><span class="gmail-author-a-0z85ztrz79zmuz69zysileegn">Ensure you have console access to the packstack vm as in case of  misconfiguration of network ssh connection will be lost.<br></span></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p>
    </p>
    <p>[1] <a href="https://www.rdoproject.org/install/packstack/" target="_blank">https://www.rdoproject.org/install/packstack/</a><br>
      [2]
<a href="https://www.rdoproject.org/networking/neutron-with-existing-external-network" target="_blank">https://www.rdoproject.org/networking/neutron-with-existing-external-network</a><br>
      <br>
      <br>
    </p>
  </div>

_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.rdoproject.org" target="_blank">users@lists.rdoproject.org</a><br>
<a href="http://lists.rdoproject.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rdoproject.org/mailman/listinfo/users</a><br>
<br>
To unsubscribe: <a href="mailto:users-unsubscribe@lists.rdoproject.org" target="_blank">users-unsubscribe@lists.rdoproject.org</a><br>
</blockquote></div><br clear="all"><br></div>Thanks and Regards <br><div><div dir="ltr" class="gmail_signature"><div dir="ltr">Yatin Karel</div></div></div></div>