[Bug 2041727] Re: "netplan apply" produces ovsdb-server.service WARNING even when openvswitch-switch not installed
Dexuan Cui
2041727 at bugs.launchpad.net
Thu Nov 9 03:28:46 UTC 2023
I hit the same bug today. Thanks Brian for proposing the fix, which
works for me.
** Also affects: netplan
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netplan.io in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/2041727
Title:
"netplan apply" produces ovsdb-server.service WARNING even when
openvswitch-switch not installed
Status in netplan:
New
Status in netplan.io package in Ubuntu:
Triaged
Bug description:
Example:
bfinley at flashmq2:~$ sudo netplan apply
WARNING:root:Cannot call Open vSwitch: ovsdb-server.service is not running.
bfinley at flashmq2:~$ apt-file search ovsdb-server.service
openvswitch-switch: /lib/systemd/system/ovsdb-server.service
bfinley at flashmq2:~$ dpkg -l openvswitch-switch
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==================-============-============-=================================
un openvswitch-switch <none> <none> (no description available)
Possible resolution:
If the package isn't installed, there's no reason to warn that a non-
existent service can't be restarted.
Therefore, in "/usr/share/netplan/netplan/cli/commands/apply.py", on
line 417 (as of this version), include a test for the existence of
ovsdb-server.service before warning about it.
Here's a patch that does just that:
bfinley at flashmq1:/usr/share/netplan/netplan$ diff -urN cli/commands/apply.py.orig cli/commands/apply.py
--- cli/commands/apply.py.orig 2023-10-28 17:18:39.690507475 +0000
+++ cli/commands/apply.py 2023-10-28 17:25:23.940383821 +0000
@@ -414,4 +414,5 @@
if exit_on_error:
sys.exit(1)
except OvsDbServerNotRunning as e:
- logging.warning('Cannot call Open vSwitch: {}.'.format(e))
+ if utils.systemctl_is_active('ovsdb-server.service'):
+ logging.warning('Cannot call Open vSwitch: {}.'.format(e))
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: netplan.io 0.106.1-7ubuntu0.22.04.2
ProcVersionSignature: Ubuntu 5.15.0-87.97-generic 5.15.122
Uname: Linux 5.15.0-87-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
CloudArchitecture: x86_64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
Date: Sat Oct 28 16:54:18 2023
InstallationDate: Installed on 2023-10-24 (4 days ago)
InstallationMedia: Ubuntu-Server 22.04.3 LTS "Jammy Jellyfish" - Release amd64 (20230810)
ProcEnviron:
TERM=tmux-256color
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: netplan.io
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/2041727/+subscriptions
More information about the foundations-bugs
mailing list