OVN DB Sync Integration with neutron-ovn-db-sync-util¶
Overview¶
The OVN Octavia provider includes a synchronization plugin that integrates
with Neutron’s neutron-ovn-db-sync-util CLI tool. This allows operators
to synchronize both Neutron and Octavia resources with the OVN Northbound
database in a single operation.
The plugin is automatically discovered when ovn-octavia-provider is
installed, and is invoked as part of the standard Neutron OVN database
synchronization process.
Plugin Registration¶
The plugin is registered via setuptools entry point:
[entry_points]
neutron.ovn.db_sync =
octavia_ovn_sync = ovn_octavia_provider.ovn.db_sync:OctaviaOvnSynchronizer
This allows the Neutron sync utility to automatically discover and load the Octavia synchronizer when it runs.
Usage¶
Using with neutron-ovn-db-sync-util¶
To synchronize both Neutron and Octavia resources with OVN, run the
neutron-ovn-db-sync-util command:
neutron-ovn-db-sync-util \
--config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
--ovn-neutron_sync_mode repair
Note
You do NOT need to pass /etc/octavia/octavia.conf as a config file.
The Octavia plugin automatically loads it from the standard location
(/etc/octavia/octavia.conf). Passing it would cause conflicts with
Neutron’s database connection configuration.
This will:
Synchronize Neutron resources (networks, ports, routers, etc.)
Synchronize Octavia load balancers (OVN provider only)
Use the same OVN Northbound database connection
Apply the same sync mode to all resources
Sync Modes¶
The Octavia OVN synchronizer supports the following modes:
- repair (Recommended)
Synchronizes all Octavia load balancers with the OVN provider with the OVN Northbound database. This is the default and recommended mode.
Example:
neutron-ovn-db-sync-util \ --config-file /etc/neutron/neutron.conf \ --config-file /etc/neutron/plugins/ml2/ml2_conf.ini \ --ovn-neutron_sync_mode repair
- log (Not Supported)
The Octavia synchronizer does not support read-only verification mode. If you run the sync utility in
logmode, the Octavia plugin will skip synchronization and log a warning.- migrate
In migrate mode (used for OVS to OVN migration), the Octavia synchronizer behaves the same as in
repairmode, synchronizing all load balancers.
Synchronizing Only Octavia Resources¶
If you only need to synchronize Octavia load balancers without Neutron resources, you can use either approach:
Option 1: Using the plugin (Recommended)
neutron-ovn-db-sync-util \
--config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
--sync_plugin octavia_ovn_sync \
--ovn-neutron_sync_mode repair
This will synchronize only Octavia load balancers, skipping Neutron resources.
Option 2: Using the standalone tool
octavia-ovn-db-sync-util
The standalone tool remains available for compatibility and can be used if you prefer a dedicated command for Octavia synchronization.
Recommended Workflows¶
Synchronize everything (Neutron + Octavia):
# Stop services first
sudo systemctl stop neutron-server octavia-api
# Run sync
neutron-ovn-db-sync-util \
--config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
--ovn-neutron_sync_mode repair
# Restart services
sudo systemctl start neutron-server octavia-api
Synchronize only Octavia:
# Stop Octavia services first
sudo systemctl stop octavia-api
# Run Octavia sync (using plugin)
neutron-ovn-db-sync-util \
--config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
--sync_plugin octavia_ovn_sync \
--ovn-neutron_sync_mode repair
# Or use standalone tool
# octavia-ovn-db-sync-util
# Restart Octavia
sudo systemctl start octavia-api
Configuration¶
Required Configuration Files¶
- Configuration passed to neutron-ovn-db-sync-util:
/etc/neutron/neutron.conf- Core Neutron configuration/etc/neutron/plugins/ml2/ml2_conf.ini- ML2 plugin configuration (includes OVN connection settings)
- Configuration automatically loaded by the plugin:
/etc/octavia/octavia.conf- Octavia configuration (includes Octavia database connection and OVN provider settings)
The Octavia plugin automatically searches for and loads octavia.conf from
standard locations (/etc/octavia/octavia.conf, ~/octavia.conf,
./octavia.conf). You should NOT pass it via --config-file to
avoid database connection conflicts.
OVN Connection Sharing¶
The Octavia synchronizer reuses the OVN Northbound database connection established by Neutron. This means:
Only the OVN connection settings in the Neutron ML2 configuration are used
No separate OVN connection is created for Octavia synchronization
Reduced overhead and consistent connection parameters
Limitations¶
The Octavia OVN synchronizer has the following limitations:
No LOG Mode: The plugin does not support read-only verification. When run in LOG mode, the plugin skips synchronization and logs a warning.
OVN Provider Only: Only load balancers using the OVN provider are synchronized. Load balancers using other providers (e.g., Amphora) are not affected.
Octavia Configuration Location: The plugin expects Octavia configuration at
/etc/octavia/octavia.confor other standard locations. It cannot be passed via--config-fileto avoid database connection conflicts.
Best Practices¶
Pre-Sync Checklist¶
Before running the synchronization utility:
Stop Services: Stop neutron-server and octavia-api to prevent race conditions
Backup Databases: Create backups of both Neutron and Octavia databases
Verify OVN Connection: Ensure OVN NB database is accessible
Post-Sync Verification¶
After synchronization completes:
Check Logs: Review output for errors or warnings
Verify Resources: Confirm load balancers match between Octavia and OVN
Restart Services: Bring services back online