Reviewed: https://review.opendev.org/c/openstack/neutron/+/935990 Committed: https://opendev.org/openstack/neutron/commit/2d8fe38ad5dbdc223560f2da661ca9e384f8221b Submitter: "Zuul (22348)" Branch: master
commit 2d8fe38ad5dbdc223560f2da661ca9e384f8221b Author: Terry Wilson <twil...@redhat.com> Date: Fri Nov 22 00:00:42 2024 +0000 Update Nova aggregates on changed host mappings When creating a subnet on a segment, Nova aggregates are updated with the host information. But when adding a compute node to an existing segment or modifying what segments a node is attached to, Nova was not updated with these changes for ML2/OVN. ML2/OVS has agent code which via report_state() will call create_or_update_agent() which causes the aggregates to eventually get updated via AGENT_AFTER_CREATE events, etc. ML2/OVN does not have "real" agents. It monkeypatches some agent methods to respond to the API requests itself--but it does not use the agents db--which is what create_or_update_agent() modifies. But it shouldn't be necessary to rely on updates from the agent in our case, as the segments code can see segment host mappings being updated and just directly handle notifying nova when those change. Closes-Bug: #2096941 Change-Id: I8112076f8acb821752941396e7aa39ecb1352ca3 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/2096941 Title: [OVN Routed Provider Networks] : New Compute nodes are not added to their segment aggregate Status in neutron: Fix Released Bug description: Reference bug: https://issues.redhat.com/browse/OSPRH-8988 With ML2/OVN w/ segments, adding a compute with ovn-bridge-mappings for an existing segment does not add the compute to that segment's nova host aggregate. Modifying the ovn-bridge-mappings (adding new or deleting mappings) also does not update the nova host aggregates. With ML2/OVS, via report_state(), create_or_update_agent() is called which updates the agent db table and fires off events which lead to the nova api calls to update the aggregates. ML2/OVN does not use the agents db, but instead monkeypatches some of the agent methods to handle agent API requests. Basic devstack install w/ local.conf from the neutron repo. Add a provider bridges sudo ovs-vsctl add-br br-provider1 sudo ovs-vsctl add-br br-provider2 sudo ovs-vsctl list open . # get existing ovn-bridge-mappings, then append the new provider mapping sudo ovs-vsctl set open . external_ids:ovn-bridge-mappings="public:br-ex,providernet1:br-provider1,providernet2:br-provider2" Add a vlan provider network to ml2_conf.ini and restart q-svc [ml2_type_vlan] network_vlan_ranges = public,providernet1:100:199,providernet2:200:299 Create a provider networks openstack network create providernet1 --share --provider-physical-network providernet1 --provider-network-type vlan --provider-segment 101 openstack network create providernet2 --share --provider-physical- network providernet2 --provider-network-type vlan --provider-segment 201 Verify segments are created/get uuids openstack network segment list Set names on segments openstack network segment set --name providernet1-101 $vlan101_segment openstack network segment set --name providernet2-201 $vlan201_segment Create subnets openstack subnet create --network providernet1 --network-segment providernet1-101 --ip-version 4 --subnet-range 172.30.1.0/24 providernet1-subnet101 openstack subnet create --network providernet2 --network-segment providernet2-201 --ip-version 4 --subnet-range 172.30.2.0/24 providernet2-subnet201 Verify segments exist with corresponding aggregates openstack network segment list openstack aggregate list openstack aggregate show for each should show the host listed. Failure case: Remove br-provider2 from ovn-bridge-mappings sudo ovs-vsctl set open . external_ids:ovn-bridge-mappings="public:br-ex,providernet1:br-provider1" and notice that host is still set for the aggregate pointing to the segment for providernet2-201 Manually remove the host openstack aggregate remove host $aggregate_id $hostname and verify hosts is empty with openstack aggregate show $aggregate_id Re-add providernet2 to the ovn-bridge-mappings sudo ovs-vsctl set open . external_ids:ovn-bridge-mappings="public:br-ex,providernet1:br-provider1,providernet2:br-provider2" and verify with openstack aggregate show that the hosts field is still empty. To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/2096941/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp