From 4880de6bae8aa1a586433e2f26bab3f2e4b560ff Mon Sep 17 00:00:00 2001 From: Antony Messerli Date: Fri, 20 Feb 2026 11:31:21 -0600 Subject: ovn-db: add support for ovn-northd extra command-line arguments Adds the ovn_northd_cmdline_extras variable to allow operators to pass additional command-line arguments to the ovn-northd daemon. This enables customization of performance-related parameters such as thread count (--n-threads), parallel build (--use-parallel-build), and inactivity probe timeout (--inactivity-probe). The implementation follows the established cmdline_extras pattern used throughout kolla-ansible for services like Prometheus exporters. Closes-Bug: #2142316 Change-Id: I870034da10f80ff2208bbad529fa7de9a2548c06 Signed-off-by: Antony Messerli --- ansible/roles/ovn-db/defaults/main.yml | 3 +++ ansible/roles/ovn-db/templates/ovn-northd.json.j2 | 2 +- doc/source/reference/networking/neutron.rst | 9 +++++++++ .../notes/ovn-northd-cmdline-extras-f7419384d0a18bf1.yaml | 9 +++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/ovn-northd-cmdline-extras-f7419384d0a18bf1.yaml diff --git a/ansible/roles/ovn-db/defaults/main.yml b/ansible/roles/ovn-db/defaults/main.yml index ce244f2e0..05bd6c81c 100644 --- a/ansible/roles/ovn-db/defaults/main.yml +++ b/ansible/roles/ovn-db/defaults/main.yml @@ -143,3 +143,6 @@ ovn_sb_relay_command: >- {{ ovn_sb_db_relay_config_file_args }} # Workaround: pause after restarting containers to allow for leader election. ovn_leader_election_pause: 5 + +# Extra command line arguments for ovn-northd +ovn_northd_cmdline_extras: "" diff --git a/ansible/roles/ovn-db/templates/ovn-northd.json.j2 b/ansible/roles/ovn-db/templates/ovn-northd.json.j2 index bdffb0d12..ffa89641a 100644 --- a/ansible/roles/ovn-db/templates/ovn-northd.json.j2 +++ b/ansible/roles/ovn-db/templates/ovn-northd.json.j2 @@ -1,5 +1,5 @@ { - "command": "/usr/bin/ovn-northd -vconsole:emer -vsyslog:err -vfile:info --ovnnb-db={{ ovn_nb_connection }} --ovnsb-db={{ ovn_sb_connection_no_relay }} --log-file=/var/log/kolla/openvswitch/ovn-northd.log --pidfile=/run/ovn/ovn-northd.pid --unixctl=/run/ovn/ovn-northd.ctl", + "command": "/usr/bin/ovn-northd -vconsole:emer -vsyslog:err -vfile:info --ovnnb-db={{ ovn_nb_connection }} --ovnsb-db={{ ovn_sb_connection_no_relay }} --log-file=/var/log/kolla/openvswitch/ovn-northd.log --pidfile=/run/ovn/ovn-northd.pid --unixctl=/run/ovn/ovn-northd.ctl{% if ovn_northd_cmdline_extras %} {{ ovn_northd_cmdline_extras }}{% endif %}", "permissions": [ { "path": "/var/log/kolla/openvswitch", diff --git a/doc/source/reference/networking/neutron.rst b/doc/source/reference/networking/neutron.rst index 3994ed886..3fec073a5 100644 --- a/doc/source/reference/networking/neutron.rst +++ b/doc/source/reference/networking/neutron.rst @@ -286,6 +286,15 @@ convenient to run them from ``ovn_northd`` container: docker exec ovn_northd ovn-nbctl show +Additional command-line arguments can be passed to the ``ovn-northd`` daemon +using the ``ovn_northd_cmdline_extras`` variable. This can be useful for +tuning performance parameters: + +.. path /etc/kolla/globals.yml +.. code-block:: yaml + + ovn_northd_cmdline_extras: "--n-threads=8 --use-parallel-build --inactivity-probe=10000" + Mellanox Infiniband (ml2/mlnx) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/releasenotes/notes/ovn-northd-cmdline-extras-f7419384d0a18bf1.yaml b/releasenotes/notes/ovn-northd-cmdline-extras-f7419384d0a18bf1.yaml new file mode 100644 index 000000000..614ac34c1 --- /dev/null +++ b/releasenotes/notes/ovn-northd-cmdline-extras-f7419384d0a18bf1.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Adds support for passing additional command-line arguments to the + ``ovn-northd`` daemon via the ``ovn_northd_cmdline_extras`` variable. + This allows operators to customize ovn-northd behavior, such as setting + thread count (``--n-threads``), enabling parallel build + (``--use-parallel-build``), or tuning the inactivity probe timeout + (``--inactivity-probe``). -- cgit v1.2.3