Fixing “Cannot call Open vSwitch: ovsdb-server.service is not running” Warning

When using netplan apply on Ubuntu systems, you might encounter the warning message: WARNING:root:Cannot call Open vSwitch: ovsdb-server.service is not running. This message can be misleading, especially if you are not actively using or have not installed Open vSwitch (OVS). This article explains why this warning occurs and how a simple patch can resolve this unnecessary notification.

This warning arises because Netplan, a network configuration tool in Ubuntu, checks for the ovsdb-server.service status, which is part of Open vSwitch. If this service is not running, Netplan issues a warning. However, this check is performed regardless of whether Open vSwitch is actually configured or intended to be used in your network setup. Consequently, users who do not rely on OVS will still see this warning, creating confusion and potentially obscuring more critical messages.

To understand the root cause, let’s examine the commands used in the original report. The user first encountered the warning after running sudo netplan apply. They then used apt-file search ovsdb-server.service to locate the package associated with the service, finding it within openvswitch-switch. Further investigation with dpkg -l openvswitch-switch revealed that the openvswitch-switch package was not even installed on the system. This clearly indicates that the warning is being triggered even when Open vSwitch is absent, making it an irrelevant and noisy warning in such cases.

The proposed solution involves modifying the Netplan script to check if the ovsdb-server.service actually exists before issuing the warning. This can be achieved by adding a simple check in the /usr/share/netplan/netplan/cli/commands/apply.py file. The provided patch introduces this check using utils.systemctl_is_active('ovsdb-server.service'). This modification ensures that the warning is only displayed when the ovsdb-server.service is expected to be running, meaning the service exists and is likely intended to be active.

Applying this patch effectively suppresses the warning message when Open vSwitch is not in use, leading to cleaner and more relevant system logs. For users who do not utilize Open vSwitch, this change eliminates a redundant warning, improving the overall clarity and usability of Netplan’s output. By implementing this minor adjustment, Netplan becomes more user-friendly by only reporting relevant warnings, enhancing the diagnostic experience for network configuration issues.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *