ovn: additional systemd units requested

Bug #1843582 reported by Frode Nordahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openvswitch (Ubuntu)
Fix Released
High
James Page

Bug Description

I am working on Juju Charms for deploying OVN.

At present the OVN components are distributed in the following binary packages:

 - ``ovn-common``

   - CLI tools, man pages, scripts

 - ``ovn-docker``

   - Docker components

 - ``ovn-host``

   - Host components, the local controller to install on each participant in a OVN network

 - ``ovn-central``

   - ovn-northd daemon, OVSDB database schemas for the Northbound and Southbound databases

 - ``ovn-controller-vtep``

   - Controller to integrate with hardware VTEP-enabled switches

The ``ovn-central`` package contains a SysV init script that reads some parameters from ``/etc/default/ovn-central`` and calls out to the ``/usr/share/openvswitch/scripts/ovn-ctl`` script from the ``ovn-common`` package.

The default mode of operation for this init script is to start ovsdb-server processes for both the Northbound and Southbound databases and then start the ``ovn-northd`` daemon.

While working on the design of the charm [0] it has been identified [1][2] that the Southbound DB has different scaling requirements than the other components, and its load will be relative to the number of transport nodes (controllers) in the system [3].

As a consequence the charm will aim to support separate placement of the Southbound DB. To accomplish this I would need individual service control for the ``ovn-northd`` daemon, the ``ovsdb-server`` for Northound DB and the ``ovsdb-server`` for Southbound DB.

You get to pull most levers by controlling command line arguments through the ``OVN_CTL_OPTS`` variable in ``/etc/default/ovn-central``, including starting the ``ovn-northd`` daemon by itself.

But you do not get to individual service control of the Northbound- and Southbound- databases.

What I propose is that we add systemd units for ``nb_ovsdb`` and ``sb_ovsdb`` which pulls in variables from /etc/default/<unit name> in similar fashion as the existing ``ovn-central`` script and then calls out to ``/usr/share/openvswitch/scripts/ovn-ctl`` with ``start_nb_ovsdb`` and ``start_sb_ovsdb`` parameters respectively.

I guess a generic approach would be to support this for all the start and stop targets the ``ovn-ctl`` script supports, but I only have use for individual control of ``ovn-northd``, ``nb_ovsdb`` and ``sb_ovsdb`` at this point.

A argument for not just using the ``ovn-ctl`` script directly from the charm is that there are well established workflows in our charm frameworks for service control through init scripts, and it would be useful to be able to use that directly.

Side note: the OVN project have recently moved into its own set of repositories [4] and we may need to consider creating a separate source package for it at some point.

0: https://specs.openstack.org/openstack/charm-specs/specs/train/approved/charm-openstack-ovn.html
1: https://review.opendev.org/#/c/680415/
2: https://pbs.twimg.com/media/EDr3IPXXsAAg2Vb.jpg
3: http://www.openvswitch.org/support/dist-docs/ovn-architecture.7.html
4: https://github.com/ovn-org/

Revision history for this message
Frode Nordahl (fnordahl) wrote :

A proposal for how the systemd service files could look is proposed as part for the charm here: https://review.opendev.org/#/c/690025/

Note: the ``ovn_northd.service`` should probably be updated to pass in ``--ovn-manage-ovsdb=no`` instead of relying on the existence of ``/etc/openvswitch/ovn-northd-db-params.conf``. This works for the charm implementation as it will always write that file.

Revision history for this message
Frode Nordahl (fnordahl) wrote :

Another note about the proposed systemd service file referenced in comment #1. As they are laid out in the charm atm. they give some unintended consequences, i.e if you restart ``ovn-northd`` also the databases will be restarted. That would need to be sorted before we add them to the packages.

James Page (james-page)
Changed in openvswitch (Ubuntu):
status: New → Triaged
importance: Undecided → High
milestone: none → ubuntu-19.12
assignee: nobody → James Page (james-page)
status: Triaged → In Progress
Revision history for this message
James Page (james-page) wrote :

I'm aiming to include systemd configurations in the OVN splitout packages - testing here:

https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3694/+packages

James Page (james-page)
Changed in openvswitch (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.