Bug 2013820 - OVN with dhcp-agent - assigning segment to a subnet removes DHCP IPs / agents
Summary: OVN with dhcp-agent - assigning segment to a subnet removes DHCP IPs / agents
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-networking-ovn
Version: 16.2 (Train)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: z2
: 16.2 (Train on RHEL 8.4)
Assignee: Rodolfo Alonso
QA Contact: Eran Kuris
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-13 20:23 UTC by Chris Janiszewski
Modified: 2023-12-05 12:45 UTC (History)
8 users (show)

Fixed In Version: python-networking-ovn-7.4.2-0.20220127234927.3a1deba.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-12-05 12:45:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1949967 0 None None None 2021-11-05 12:23:07 UTC
OpenStack gerrit 816856 0 None MERGED [OVN] Check new added segments in OVN mech driver 2023-10-19 16:18:34 UTC
OpenStack gerrit 826272 0 None MERGED [OVN] Check new added segments in OVN mech driver 2023-10-19 16:18:35 UTC
Red Hat Issue Tracker OSP-10404 0 None None None 2021-11-18 14:59:32 UTC

Description Chris Janiszewski 2021-10-13 20:23:18 UTC
Description of problem:
I am trying to validate Ironic in the Overcloud with OVN and routed networking topology.
I am unable to create neutron segments without openstack removing the dhcp servers created under dhcp-agent

Here is a runlog:

(tigerlab-central) [stack@dcn-undercloud ~]$ openstack network segment set --name segment0 ff17ee9d-04f9-47a7-8d55-a02097b1bbad                                                                                                              
(tigerlab-central) [stack@dcn-undercloud ~]$ openstack port list --network oc_provisioning --device-owner network:dhcp -c "Fixed IP Addresses" -c "ID"                                                                                       
+----------------------------------------------------------------------------+--------------------------------------+
| Fixed IP Addresses                                                         | ID                                   |
+----------------------------------------------------------------------------+--------------------------------------+
| ip_address='10.9.64.236', subnet_id='55389619-ecc0-4605-9830-e3035dc4f9a1' | 3679e2ba-59e5-4f5b-9166-c23fb191bb55 |
| ip_address='10.9.64.239', subnet_id='55389619-ecc0-4605-9830-e3035dc4f9a1' | 3c6ea9c9-7283-45ec-8b5b-17969c7dc5e2 |
| ip_address='10.9.64.238', subnet_id='55389619-ecc0-4605-9830-e3035dc4f9a1' | 66b635e6-dd0c-4f5c-8507-9ec183e221dc |
| ip_address='10.9.64.242', subnet_id='55389619-ecc0-4605-9830-e3035dc4f9a1' | 674896b2-0f02-4b22-8e70-19608fe20102 |
| ip_address='10.9.64.241', subnet_id='55389619-ecc0-4605-9830-e3035dc4f9a1' | 7a40184b-4e4d-4e76-9acb-cd1e8cbb3d93 |
| ip_address='10.9.64.237', subnet_id='55389619-ecc0-4605-9830-e3035dc4f9a1' | def6e40c-bda5-418f-97ce-4e2265b1dcc1 |
| ip_address='10.9.64.240', subnet_id='55389619-ecc0-4605-9830-e3035dc4f9a1' | e36d8095-1379-49d9-9a1c-0f197bf86f39 |
+----------------------------------------------------------------------------+--------------------------------------+
(tigerlab-central) [stack@dcn-undercloud ~]$ openstack subnet set --network-segment segment0 oc_provisioning-seg0                                                                                                                            
(tigerlab-central) [stack@dcn-undercloud ~]$ openstack port list --network oc_provisioning --device-owner network:dhcp -c "Fixed IP Addresses" -c "ID"                                                                                       
+----------------------------------------------------------------------------+--------------------------------------+
| Fixed IP Addresses                                                         | ID                                   |
+----------------------------------------------------------------------------+--------------------------------------+
| ip_address='10.9.64.238', subnet_id='55389619-ecc0-4605-9830-e3035dc4f9a1' | 66b635e6-dd0c-4f5c-8507-9ec183e221dc |
+----------------------------------------------------------------------------+--------------------------------------+
As you can see after assigning the network segment all my dhcp servers disappearing.

Without the dhcp I am not able to forward the Ironic DHCP traffic for cleaning and provisioning.



Version-Release number of selected component (if applicable):
cat /etc/rhosp-release 
Red Hat OpenStack Platform release 16.2.0 GA (Train)


How reproducible:
I'll include below my deployment command and relevant template files.


Steps to Reproduce:
1. Deploy Overcloud with Ironic and OVN
2. Attempt to create ironic networks/segments to accommodate routed networking
3.

Actual results:
DHCP servers get removed

Expected results:
Ability to match OVS behavior where DHCP servers don't get removed

Additional info:
Exactly same topology with OVS works fine, so the problem is isolated to OVN
Ironic with OVN seems to work as long as neutron-dhcp-agent is included and flat network is being used. The problem only occurs when using routed networking

Commands used to create those segmented networks:

#!/bin/bash

source ~/tigerlab-centralrc

openstack network create oc_provisioning --provider-network-type flat --provider-physical-network baremetal --share --external --mtu 1500
SID=$(openstack network segment list --network oc_provisioning -c ID -f value)
openstack network segment set --name segment0 ${SID}
openstack network segment create --network oc_provisioning --physical-network segment1 --network-type flat segment1
openstack network segment create --network oc_provisioning --physical-network segment2 --network-type flat segment2
openstack subnet create --network-segment segment0 --network oc_provisioning --subnet-range 10.9.64.192/26 --dhcp --allocation-pool start=10.9.64.236,end=10.9.64.254 --gateway=10.9.64.193 oc_provisioning-seg0
openstack subnet create --network-segment segment1 --network oc_provisioning --subnet-range 10.9.66.192/26 --dhcp --allocation-pool start=10.9.66.236,end=10.9.66.254 --gateway=10.9.66.193 oc_provisioning-seg1
openstack subnet create --network-segment segment2 --network oc_provisioning --subnet-range 10.9.70.192/26 --dhcp --allocation-pool start=10.9.70.236,end=10.9.70.254 --gateway=10.9.70.193 oc_provisioning-seg2

I'll include relevant templates and sosreport below

Comment 10 Chris Janiszewski 2021-11-18 17:02:26 UTC
I was able to recreate this in my lab and found relatively simple workaround.

The original script for creating these baremetal routed networks has been like this:

openstack network create oc_provisioning --provider-network-type flat --provider-physical-network provider0 --share --external --mtu 1500
SID=$(openstack network segment list --network oc_provisioning -c ID -f value)
openstack network segment set --name segment0 ${SID}                       #  <-------- this is the line where the problem occurs 
openstack network segment create --network oc_provisioning --physical-network provider1 --network-type flat segment1
openstack network segment create --network oc_provisioning --physical-network provider2 --network-type flat segment2
openstack subnet create --network-segment segment0 --network oc_provisioning --subnet-range 10.60.0.0/24 --dhcp --allocation-pool start=10.60.0.100,end=10.60.0.199 --gateway=10.60.0.1 oc_provisioning-seg0
openstack subnet create --network-segment segment1 --network oc_provisioning --subnet-range 10.60.1.0/24 --dhcp --allocation-pool start=10.60.1.100,end=10.60.1.199 --gateway=10.60.1.1 oc_provisioning-seg1
openstack subnet create --network-segment segment2 --network oc_provisioning --subnet-range 10.60.2.0/24 --dhcp --allocation-pool start=10.60.2.100,end=10.60.2.199 --gateway=10.60.2.1 oc_provisioning-seg2


.. and here is the modified script that result in all the segments being created properly with corresponding dhcp servers:


openstack network create oc_provisioning --provider-network-type flat --provider-physical-network provider0 --share --external --mtu 1500
SID=$(openstack network segment list --network oc_provisioning -c ID -f value)
openstack network segment set --name segment0 ${SID}
openstack network segment create --network oc_provisioning --physical-network provider1 --network-type flat segment1
openstack network segment create --network oc_provisioning --physical-network provider2 --network-type flat segment2
openstack subnet create --network-segment segment1 --network oc_provisioning --subnet-range 10.60.1.0/24 --dhcp --allocation-pool start=10.60.1.100,end=10.60.1.199 --gateway=10.60.1.1 oc_provisioning-seg1
openstack subnet create --network-segment segment2 --network oc_provisioning --subnet-range 10.60.2.0/24 --dhcp --allocation-pool start=10.60.2.100,end=10.60.2.199 --gateway=10.60.2.1 oc_provisioning-seg2

openstack network segment delete segment0     # <--- deleting and recreating that broken segment brings back the dhcp IPs
openstack network segment create --network oc_provisioning --physical-network provider0 --network-type flat segment0
openstack subnet create --network-segment segment0 --network oc_provisioning --subnet-range 10.60.0.0/24 --dhcp --allocation-pool start=10.60.0.100,end=10.60.0.199 --gateway=10.60.0.1 oc_provisioning-seg0


After running the second script I get all the network segments with it's dhcp ip created properly:
(ironicovn-central) [stack@ironic-ovn-undercloud scripts]$ openstack port list --network oc_provisioning --device-owner network:dhcp -c "Fixed IP Addresses" -c "ID"
+----------------------------------------------------------------------------+--------------------------------------+
| Fixed IP Addresses                                                         | ID                                   |
+----------------------------------------------------------------------------+--------------------------------------+
| ip_address='10.60.0.102', subnet_id='a4b8db62-50a7-47c5-a6d5-22253a19742c' | 347c5908-f867-4254-a5d3-6ec5b764ed05 |
| ip_address='10.60.0.101', subnet_id='a4b8db62-50a7-47c5-a6d5-22253a19742c' | 459f1e6a-1318-42d5-877b-909150334ff0 |
| ip_address='10.60.1.101', subnet_id='cb827bc1-c055-477d-8956-ad14293b0dbb' | 80f1a603-2705-42ad-bb1e-e8df03c1e3c7 |
| ip_address='10.60.0.103', subnet_id='a4b8db62-50a7-47c5-a6d5-22253a19742c' | 934a9bad-0117-47e5-a605-537e83ab95e4 |
| ip_address='10.60.1.100', subnet_id='cb827bc1-c055-477d-8956-ad14293b0dbb' |                                      |
| ip_address='10.60.2.101', subnet_id='6516265f-e3c1-4598-ba7c-353fdeced9d2' |                                      |
| ip_address='10.60.0.100', subnet_id='a4b8db62-50a7-47c5-a6d5-22253a19742c' | 9d3ff2a4-6d92-4cff-89ce-c258f8ae360b |
| ip_address='10.60.2.100', subnet_id='6516265f-e3c1-4598-ba7c-353fdeced9d2' | ade2303d-d1c0-4a7a-8188-9d389b59d801 |
| ip_address='10.60.1.103', subnet_id='cb827bc1-c055-477d-8956-ad14293b0dbb' | c5af59b6-7150-4479-b2dd-668238b8ddaa |
| ip_address='10.60.1.102', subnet_id='cb827bc1-c055-477d-8956-ad14293b0dbb' | de72c40a-be9a-48de-8131-7f79d0865d2e |
+----------------------------------------------------------------------------+--------------------------------------+

Comment 15 OSP Team 2022-01-28 11:39:16 UTC
According to our records, this should be resolved by python-networking-ovn-7.4.2-2.20210601204831.el8ost.13.  This build is available now.


Note You need to log in before you can comment on or make changes to this bug.