Skip to main content

A10 nlbaas2oct

This tool has been designed to migration A10 devices and their associated neutron lbaas objects from the Neutron database to Octavia.

Installation

Install from PyPi

pip install a10-nlbaas2oct

Install from Source

git clone git@github.com:a10networks/a10-nlbaas2oct.git
cd a10-nlbaas2oct
pip install -e .

Note: This tool must be installed on the host running neutron-lbaas

Usage

Step 1: Copy the sample config file from the project to another directory

Installed from PyPi

pip show a10-nlbaas2oct | grep "Location" | cp $(awk '{print $2}')/a10_nlbaas2oct/a10_nlbaas2oct.conf /path/to/another/directory

Installed from source

cp /path/to/a10-nlbaas2oct/a10_nlbaas2oct/a10_nlbaas2oct.conf /path/to/another/directory

Sample Config File Contents

[DEFAULT]

debug = True

[migration]

# Run without making changes
# trial_run = False

# Delete the load balancer records from neutron-lbaas after migration
# delete_after_migration = False

# Octavia service account ID or username (ex: admin)
octavia_account_id =

# Example db connection string:
# connection = mysql+pymysql://root:password@127.0.0.1:3306/octavia
# Replace 127.0.0.1 above with the IP address of the database used by the
# main octavia server. (Leave it as is if the database runs on this host.)

# Connection string for the keystone databas
keystone_db_connection =

# Connection string for the neutron database
neutron_db_connection =

# Connection string for the octavia database
octavia_db_connection =

# Connection string for the A10 database used in neutron lbaas env
# a10_nlbaas_db_connection =

# Connection string for the A10 database used in the octavia env
# a10_oct_connection =

# Path to config file. Default is /etc/a10/config.py
a10_config_path = /etc/a10/config.py

Step 2: Modify the config file

Database connection string locations

The keystone_db_connection can be found in the /etc/keystone/keystone.conf file under the database group.

[database]
connection = mysql+pymysql://root:password@127.0.0.1/keystone?charset=utf8

The neutron_db_connection can be found in the /etc/neutron/neutron.conf file under the database group.

[database]
connection = mysql+pymysql://user:password@127.0.0.1/neutron?charset=utf8

The octavia_db_connection can be found be found in the /etc/octavia/octavia.conffile under the database group.

[database]
connection = mysql+pymysql://root:password@127.0.0.1:3306/octavia

Config for migrating from Neutron LBaaS to Octavia on the same host

# Octavia service account ID or username (ex: admin)
octavia_account_id = admin

# Connection string for the keystone databas
keystone_db_connection = mysql+pymysql://root:password@127.0.0.1/keystone?charset=utf8

# Connection string for the neutron database
neutron_db_connection = mysql+pymysql://user:password@127.0.0.1/neutron?charset=utf8

# Connection string for the octavia database
octavia_db_connection = mysql+pymysql://root:password@127.0.0.1:3306/octavia

# Path to config file. Default is /etc/a10/config.py
a10_config_path = /etc/a10/config.py

Config for migrating from Neutron LBaaS to Octavia across hosts

# Octavia service account ID or username (ex: admin)
octavia_account_id = admin

# Connection string for the keystone databas
keystone_db_connection = mysql+pymysql://root:password@127.0.0.1/keystone?charset=utf8

# Connection string for the neutron database
neutron_db_connection = mysql+pymysql://user:password@127.0.0.1/neutron?charset=utf8

# Connection string for the octavia database
octavia_db_connection = mysql+pymysql://root:password@<b>ip_address_of_remote_host</b>:3306/octavia

# Path to config file. Default is /etc/a10/config.py
a10_config_path = /etc/a10/config.py

Performing cross host migration when A10 database is seperate from Neutron DB and Octavia DB

# Octavia service account ID or username (ex: admin)
octavia_account_id = admin

# Connection string for the keystone databas
keystone_db_connection = mysql+pymysql://root:password@127.0.0.1/keystone?charset=utf8

# Connection string for the neutron database
neutron_db_connection = mysql+pymysql://user:password@127.0.0.1/neutron?charset=utf8

# Connection string for the octavia database
octavia_db_connection = mysql+pymysql://root:password@<b>ip_address_of_remote_host</b>:3306/octavia

# Path to config file. Default is /etc/a10/config.py
a10_config_path = /etc/a10/config.py

# Connection string for the A10 database used in neutron lbaas env
a10_nlbaas_db_connection = mysql+pymysql://user:password@127.0.0.1/a10_db

# Connection string for the A10 database used in the octavia env
a10_oct_connection = mysql+pymysql://user:password@<b>ip_address_of_remote_host</b>/a10_db

Performing migration when using parent projects

# Octavia service account ID or username (ex: admin)
octavia_account_id = admin

# Connection string for the keystone database
<b>keystone_db_connection = mysql+pymysql://user:password@127.0.0.1/keystone?charset=utf8</b>

# Connection string for the neutron database
neutron_db_connection = mysql+pymysql://user:password@127.0.0.1/neutron?charset=utf8

# Connection string for the octavia database
octavia_db_connection = mysql+pymysql://root:password@127.0.0.1:3306/octavia

# Path to config file. Default is /etc/a10/config.py
a10_config_path = /etc/a10/config.py

Step 3: Perform the migration

Migrate a single loadbalancer and its child objects

a10_nlbaas2oct --config-file /path/to/a10_nlbaas2oct.conf --lb-id <loadbalancer_id>

Note: This takes in the UUID of the loadbalancer **not* the name*

Migrate all lbaas objects in a project

a10_nlbaas2oct --config-file /path/to/a10_nlbaas2oct.conf --project-id <project_id>

Note: This takes in the UUID of the project **not* the name*

Migrate all lbaas objects

a10_nlbaas2oct --config-file /path/to/a10_nlbaas2oct.conf --all

Step 4 (OPTIONAL): Cleanup post migration

There is a foreign key association with the VIP Port in the Neutron port table and the VIP entries in the Neutron lbaas_loadbalancer table. When performing a migration from Neutron LBaaS to Octavia, the VIPs are migrated to their own table and VIP port ownership is transferred to Octavia.

However, that foreign key relationship between VIP and VIP Port will still exist in the Neutron lbaas_loadbalancer table and the port table. Therefore, a delete action on either the load balancer in the Neutron LBaaS table or the Octavia will result in a failure due to the deadlocked foreign key state. As such, it is required that the Neutron LBaaS database entries are deleted or otherwise made inaccessible before performing delete commands via Octavia.

a10_nlbaas2oct --config-file /path/to/a10_nlbaas2oct.conf [--lb-id <lb_id> | --all | --project-id <project_id>]  --cleanup

This step is only necessary if the delete_after_migration was not set to True in the config.

Note to Reader

The vast majority of this tooling was copied and modified from openstack’s neutron-lbaas repo for ease of use purposes. The original can be found here https://github.com/openstack/neutron-lbaas/tree/stable/stein/tools/nlbaas2octavia

Metadata

Release files for a10-nlbaas2oct 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for a10-nlbaas2oct 1.3.2
File Size Uploaded Provenance
a10_nlbaas2oct-1.3.2.tar.gz 23.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for a10-nlbaas2oct 1.3.2
File Interpreter ABI Platform
a10_nlbaas2oct-1.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 48.9 kB

Release files / a10_nlbaas2oct-1.3.2.tar.gz

Download URL a10_nlbaas2oct-1.3.2.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8b54481194d40a718fad3b3afb928d2f8e5cb49d8e99e9a6e6587d754167311e
BLAKE2b-256 checksum
How to use checksums
e2349402276985690348f359091320076aad09a12d3d7d90bfb463d80961f9a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.6.9

Release files / a10_nlbaas2oct-1.3.2-py3-none-any.whl

Download URL a10_nlbaas2oct-1.3.2-py3-none-any.whl
Size 25.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
275e764237de3687859708bed80de0305fe5a7932ec43a8b6e39bbb8b9286ae3
BLAKE2b-256 checksum
How to use checksums
1cce82aa17b78748ceefa87816aa20367f219faf49d01dce078c5963de50dbb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.6.9

Security for a10-nlbaas2oct 1.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page