Comment 0 for bug 1887177

Revision history for this message
Brian Turek (brian-turek) wrote : ovsdb-server.service needs a depedency on local-fs.target

I recently just did a from-scratch install of Ubuntu 20.04 server edition and ran into issues with Open vSwitch and ZFS. I attempted to use ZFS for all of /var only to find that ovsdb-server pre-empted my ZFS /var mount which caused it to crash when trying to read its configuration DB at/var/lib/openvswitch/conf.db After much troubleshooting, the problem basically boils down to ovsdb-server.service needing a requirement on local-fs.target

I then found a blog post on Open Cloud Blog (https://www.opencloudblog.com/?p=240) that contained a fix:

The "After" line /lib/systemd/system/ovsdb-server.service needs the following changes:

    [Unit]
    Description=Open vSwitch Database Unit
    After=syslog.target network-pre.target dpdk.service local-fs.target
    Before=network.target networking.service
    PartOf=openvswitch-switch.service
    DefaultDependencies=no

    [Service]
    LimitNOFILE=1048576
    Type=forking
    Restart=on-failure
    EnvironmentFile=-/etc/default/openvswitch
    ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
              --no-ovs-vswitchd --no-monitor --system-id=random \
              start $OPTIONS
    ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop
    ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd \
               --no-monitor restart $OPTIONS
    RuntimeDirectory=openvswitch
    RuntimeDirectoryMode=0755