Public bug reported:

I am working on Juju Charms for deploying OVN.

At present the OVN components are distributed in the following binary

 - ``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 

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.


** Affects: openvswitch (Ubuntu)
     Importance: Undecided
         Status: New

You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

  ovn: additional systemd units requested

To manage notifications about this bug go to:

ubuntu-bugs mailing list

Reply via email to