Bug 2089420 - Error creating a external network after overcloud installation
Summary: Error creating a external network after overcloud installation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 17.0 (Wallaby)
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: ---
Assignee: Rodolfo Alonso
QA Contact: Fiorella Yanac
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-23 15:57 UTC by Eduardo Olivares
Modified: 2022-09-21 12:22 UTC (History)
9 users (show)

Fixed In Version: openstack-neutron-18.4.1-0.20220622150406.771de46.el9ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-21 12:21:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1976292 0 None None None 2022-05-30 15:47:47 UTC
OpenStack gerrit 843933 0 None master: MERGED neutron: [OVN] Protect the AgentCache iteration by copying the local cache (Icf92685579409282bad0a80ba42531c93738e0b1) 2022-06-28 14:36:17 UTC
OpenStack gerrit 844552 0 None stable/wallaby: MERGED neutron: [OVN] Protect the AgentCache iteration by copying the local cache (Icf92685579409282bad0a80ba42531c93738e0b1) 2022-06-28 14:36:21 UTC
Red Hat Issue Tracker OSP-15354 0 None None None 2022-05-23 15:58:19 UTC
Red Hat Product Errata RHEA-2022:6543 0 None None None 2022-09-21 12:22:06 UTC

Description Eduardo Olivares 2022-05-23 15:57:09 UTC
Description of problem:
The first operation I performed on an Openstack 17.0 environment after the overcloud was installed is to create an external network (see task "create the external network with vlan transparency":
http://rhos-ci-logs.lab.eng.tlv2.redhat.com/logs/staging/DFG-network-networking-ovn-17.0_director-rhel-virthost-3cont_2comp-ipv4-vlan-sriov/54/console_logs/ir-cloud-config.log

The following error was obtained:
Error while executing command: HttpException: 500, Request Failed: internal server error while processing your request.


The following exception is printed in the controller-1 neutron server logs:
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc [req-f6cfe61c-3179-451e-b6c7-339441ff18a5 d883b14b25014525867759a08c317401 84df20cacdd84d34ae3b9dac48dcf83d - - -] Exception while dispatching security_group events: dictionary changed size during iteration: RuntimeError: dictionary changed size during iteration
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc Traceback (most recent call last):
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc   File "/usr/lib/python3.9/site-packages/neutron/plugins/ml2/ovo_rpc.py", line 131, in dispatch_events
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc     self._resource_push_api.push(context, [obj], rpc_event)
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc   File "/usr/lib/python3.9/site-packages/neutron/api/rpc/handlers/resources_rpc.py", line 245, in push
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc     self._push(context, resource_type, type_resources, event_type)
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc   File "/usr/lib/python3.9/site-packages/neutron/api/rpc/handlers/resources_rpc.py", line 251, in _push
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc     for version in version_manager.get_resource_versions(resource_type):
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc   File "/usr/lib/python3.9/site-packages/neutron/api/rpc/callbacks/version_manager.py", line 250, in get_resource_versions
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc     return _get_cached_tracker().get_resource_versions(resource_type)
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc   File "/usr/lib/python3.9/site-packages/neutron/api/rpc/callbacks/version_manager.py", line 226, in get_resource_versions
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc     self._check_expiration()
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc   File "/usr/lib/python3.9/site-packages/neutron/api/rpc/callbacks/version_manager.py", line 222, in _check_expiration
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc     self._update_consumer_versions()
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc   File "/usr/lib/python3.9/site-packages/neutron/api/rpc/callbacks/version_manager.py", line 211, in _update_consumer_versions
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc     neutron_plugin.get_agents_resource_versions(new_tracker)
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc   File "/usr/lib/python3.9/site-packages/neutron/db/agents_db.py", line 467, in get_agents_resource_versions
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc     for agent in self._get_agents_considered_for_versions():
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc   File "/usr/lib/python3.9/site-packages/neutron/db/agents_db.py", line 453, in _get_agents_considered_for_versions
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc     up_agents = self.get_agents(context.get_admin_context(),
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc   File "/usr/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py", line 1255, in fn
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc     return op(results, new_method(*args, _driver=self, **kwargs))
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc   File "/usr/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py", line 1318, in get_agents
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc     for agent in n_agent.AgentCache():
2022-05-23 15:13:20.732 17 ERROR neutron.plugins.ml2.ovo_rpc RuntimeError: dictionary changed size during iteration



The event ChassisMetadataAgentWriteEvent was called right before this traceback, so maybe the number of agents changed.


I tried to reproduce it after that, and I couldn't. My guess is that either:
- it's only reproducible the first time a network is created after the overcloud installation or
- it's an unlikely race condition or
- the overcloud installation was not really completed, although the installation had finished some minutes before, according to infrared


This is the command that reproduced the issue:
openstack network create public    --external --transparent-vlan --share    --provider-network-type vlan    --provider-segment 319    --provider-physical-network datacentre


Version-Release number of selected component (if applicable):
RHOS-17.0-RHEL-9-20220519.n.1

How reproducible:
only once

Comment 10 errata-xmlrpc 2022-09-21 12:21:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:6543


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