[Bug 1995598] [NEW] netplan apply will crash if openvswitch is not running
Danilo Egea Gondolfo
1995598 at bugs.launchpad.net
Thu Nov 3 11:00:04 UTC 2022
Public bug reported:
The problem was reported on Ubuntu 22.04.
netplan apply will call ovs-vsctl and will crash if openvswitch is not running.
# sudo netplan apply
ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
Traceback (most recent call last):
File "/usr/sbin/netplan", line 23, in <module>
netplan.main()
File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 247, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 61, in run
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 247, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 167, in command_apply
NetplanApply.process_ovs_cleanup(config_manager, old_files_ovs, restart_ovs, exit_on_error)
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 394, in process_ovs_cleanup
apply_ovs_cleanup(config_manager, ovs_old, ovs_current)
File "/usr/share/netplan/netplan/cli/ovs.py", line 138, in apply_ovs_cleanup
out = subprocess.check_output([OPENVSWITCH_OVS_VSCTL, '--columns=name,external-ids',
File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/ovs-vsctl', '--columns=name,external-ids', '-f', 'csv', '-d', 'bare', '--no-headings', 'list', 'Port']' returned non-zero exit status 1.
Netplan should throw a warning message and ignore ovs configuration is
cases like this.
** Affects: netplan.io (Ubuntu)
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/1995598
Title:
netplan apply will crash if openvswitch is not running
Status in netplan.io package in Ubuntu:
New
Bug description:
The problem was reported on Ubuntu 22.04.
netplan apply will call ovs-vsctl and will crash if openvswitch is not running.
# sudo netplan apply
ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
Traceback (most recent call last):
File "/usr/sbin/netplan", line 23, in <module>
netplan.main()
File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 247, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 61, in run
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 247, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 167, in command_apply
NetplanApply.process_ovs_cleanup(config_manager, old_files_ovs, restart_ovs, exit_on_error)
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 394, in process_ovs_cleanup
apply_ovs_cleanup(config_manager, ovs_old, ovs_current)
File "/usr/share/netplan/netplan/cli/ovs.py", line 138, in apply_ovs_cleanup
out = subprocess.check_output([OPENVSWITCH_OVS_VSCTL, '--columns=name,external-ids',
File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/ovs-vsctl', '--columns=name,external-ids', '-f', 'csv', '-d', 'bare', '--no-headings', 'list', 'Port']' returned non-zero exit status 1.
Netplan should throw a warning message and ignore ovs configuration is
cases like this.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1995598/+subscriptions
More information about the foundations-bugs
mailing list