Browse Source

openvswitch: only init bridges when (re)starting

Calling the ovs_bridge_init function when stopping the service will
result in ovs-vsctl being called after ovsdb-server has been shut down.
This causes the following error:

ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)

Calling the ovs_bridge_init function when requesting the service status
has no added value.

Only call ovs_bridge_init during start or restart to fix this.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
lilik-openwrt-22.03
Stijn Tintel 3 years ago
parent
commit
a5648280b3
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      net/openvswitch/files/openvswitch.init

+ 6
- 1
net/openvswitch/files/openvswitch.init View File

@ -59,7 +59,12 @@ ovs_action() {
config_foreach "ovs_xx" "$cfgtype" "$action" "$cfgtype" config_foreach "ovs_xx" "$cfgtype" "$action" "$cfgtype"
done done
config_foreach ovs_bridge_init "ovs_bridge"
case "$action" in
restart|start)
config_foreach ovs_bridge_init "ovs_bridge"
;;
esac
} }
ovs_xx() { ovs_xx() {


Loading…
Cancel
Save