<div dir="ltr"><div><div dir="ltr">Hi Pradeep,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 21, 2020 at 6:22 PM Pradeep Antil <<a href="mailto:pradeepantil@gmail.com">pradeepantil@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 dir="ltr"><div>Hi Techies, <br></div><div><br></div><div>I am trying to deploy the latest Openstack "ussuri" on CentOS 8 VM using packstack. I have successfully installed it but the issue is that i want to i want to add my interface "enp0s3" to ovs bridge br-ex. On CentOS 7 we can do this via ifcfg-* files using network-scripts. <br></div></div></blockquote><div><br></div><div>Yes in CentOS8 network-script is not installed/enabled by default. So to manage ovs bridges you either need to install/enable network-scripts or manage bridges with NetworkManager via nmcli or other tools. <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 dir="ltr"><div></div><div><br></div><div>But i am not sure how this can be done on CentOS 8 VM as in this release network is controlled via network manager. On br-ex i will attach an external provider network or a flat network. <br></div></div></blockquote><div><br></div><div>I have pushed some fixes to doc[1] and packstack[2] to have bridges work with network-scripts and remove Network Manager warning.<br></div><div> [1] <a href="https://github.com/redhat-openstack/website/pull/1388">https://github.com/redhat-openstack/website/pull/1388</a></div><div>[2] <a href="https://review.opendev.org/738223">https://review.opendev.org/738223</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 dir="ltr"><div></div><div><br></div><div><div><img src="cid:ii_kbp2avor0" alt="image.png" width="471" height="232"></div><div><br></div><div>I have referred the below steps for the deployment.</div><div><span style="color:rgb(0,0,255)"><br></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,255)">dnf update -y<br>dnf config-manager --enable PowerTools<br>dnf install -y centos-release-openstack-ussuri<br>dnf update -y<br>dnf install -y openstack-packstack<br>reboot<br>packstack --gen-answer-file=/root/answer.txt</span><br></span><br>Edit answer file <br><br><span style="color:rgb(0,0,255)"><span style="font-family:monospace">CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vxlan,flat<br>CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vxlan<br>CONFIG_PROVISION_DEMO=n<br>CONFIG_KEYSTONE_ADMIN_PW=P@ssw0rd<br>packstack --answer-file=/root/answer.txt</span></span></div><div> </div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div></div><div>Following is the output of ovs command and interfaces on my centos 8 system <br></div><div><br></div><div><div><img src="cid:ii_kbp2kodp1" alt="image.png" width="471" height="286"><br><br></div></div></div><div><br></div></div></blockquote><div>If you like to manage ovs bridges with Network Manager you can try below steps:-</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 external interface<br></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 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 enp0s3|grep link/ether|awk '{print $2}' | tr -d '[[:space:]]'`</span></div><div id="gmail-magicdomid1348" 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-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 do no't persist after reboot<br></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 enp0s3 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-enp0s3</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 enp0s3|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 id="gmail-magicdomid1042" class="gmail-ace-line"><br></div></div><div><br></div><div>Ensure you have console access to the packstack vm as in case of wrong network config ssh connection will be lost.<br></div><div> <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 dir="ltr"><div>-- <br><div dir="ltr">Best Regards<br>Pradeep Kumar</div></div></div>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@lists.rdoproject.org" target="_blank">dev@lists.rdoproject.org</a><br>
<a href="http://lists.rdoproject.org/mailman/listinfo/dev" rel="noreferrer" target="_blank">http://lists.rdoproject.org/mailman/listinfo/dev</a><br>
<br>
To unsubscribe: <a href="mailto:dev-unsubscribe@lists.rdoproject.org" target="_blank">dev-unsubscribe@lists.rdoproject.org</a><br>
</blockquote></div><br clear="all"><br></div>Thanks and Regards<br><div><div><div dir="ltr" class="gmail_signature"><div dir="ltr">Yatin Karel</div></div></div></div></div>