Bug 2189208 - [BGP] the agent ignores the configured reconcile_interval
Summary: [BGP] the agent ignores the configured reconcile_interval
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: ovn-bgp-agent
Version: 17.1 (Wallaby)
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ga
: 17.1
Assignee: Luis Tomas Bolivar
QA Contact: Eduardo Olivares
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-24 13:12 UTC by Eduardo Olivares
Modified: 2023-08-16 01:15 UTC (History)
3 users (show)

Fixed In Version: ovn-bgp-agent-0.4.1-1.20230512001004.e697e35.el9ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-16 01:14:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 881179 0 None MERGED Ensure the reconcile intervals configuration option is enforced 2023-04-27 12:10:04 UTC
Red Hat Issue Tracker OSP-24518 0 None None None 2023-04-24 13:13:19 UTC
Red Hat Product Errata RHEA-2023:4577 0 None None None 2023-08-16 01:15:18 UTC

Description Eduardo Olivares 2023-04-24 13:12:23 UTC
Description of problem:
An OSP17.1 environment is deployed using the following configuration in a THT file:
FrrOvnBgpAgentReconcileInterval: 999999

The configuration is successfully applied to both controller and computes:
[root@cmp-3-1 ~]# crudini --get /var/lib/config-data/ansible-generated/ovn-bgp-agent/etc/ovn-bgp-agent/bgp-agent.conf DEFAULT reconcile_interval
999999
[root@cmp-3-1 ~]# podman exec -ituroot ovn_bgp_agent crudini --get /etc/ovn-bgp-agent/bgp-agent.conf DEFAULT reconcile_interval
999999

However, the logs show that the sync process is executed every two minutes:
[root@cmp-3-1 ~]# tail -f /var/log/containers/stdouts/ovn_bgp_agent.log | grep "Running reconciliation loop to ensure routes"                                                                                                                                                                                                                                       
2023-04-24T10:16:21.354719383+00:00 stdout F 2023-04-24 10:16:21.354 31494 INFO ovn_bgp_agent.agent [-] Running reconciliation loop to ensure routes/rules are in place.                                                                      
2023-04-24T10:18:26.488304881+00:00 stdout F 2023-04-24 10:18:26.487 31494 INFO ovn_bgp_agent.agent [-] Running reconciliation loop to ensure routes/rules are in place.                                                                      ^C                                                                                                                                                                                                     


The default reconcile_interval value is 120 seconds, so it seems the configured value was ignored and the default value was used instead.


I added some logs to both ovn_bgp_agent.agent and oslo_service.periodic_task and it seems the configured value is correctly obtained by the agent, but not by the periodic_task module:
2023-04-24T12:15:03.248789871+00:00 stdout F 2023-04-24 12:15:03.244 451141 DEBUG oslo_service.periodic_task [-] Running periodic task BGPAgent.sync - spacing = 120 run_periodic_tasks /usr/lib/python3.9/site-packages/oslo_service/periodic_task.py:210
2023-04-24T12:15:03.248789871+00:00 stdout F 2023-04-24 12:15:03.246 451141 INFO ovn_bgp_agent.agent [-] Running reconciliation loop to ensure routes/rules are in place. - reconcile_interval = 999999


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

How reproducible:
100%

Steps to Reproduce:
1. configure reconcile_interval with a value different from 120, either using tripleo (and deploying the overcloud after that) or directly on the .conf file (and restarting the ovn_bgp_agent service after that)
2. check how often the sync process is executed (use the grep command shown above)

Actual results:
sync is always executed every 120 seconds, ignoring the configured value

Expected results:
the configured value should not be ignored

Comment 1 Luis Tomas Bolivar 2023-04-25 08:59:18 UTC
It seems the config options are not yet loaded when the decorator applies, so it always takes the default values

Comment 16 errata-xmlrpc 2023-08-16 01:14:48 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.1 (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-2023:4577


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