2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-01 14:55:18 +00:00

utilities: check datapath exists before conntrack flush

As part of "force-reload-kmod," conntrack flush command is issued as
'action "ovs-appctl dpctl/flush-conntrack"'. In case no datapath exists
yet when issuing "force-reload-kmod," there is an error message
"ovs-vswitchd: no datapaths exist\ ovs-appctl: ovs-vswitchd: server
returned an error", which is harmless but potentially shows up as "FAILED."
Add an if condition to check whether datapath exists before running the
conntrack flush command.

VMware-BZ: #2170402
Fixes: 265d70310c ("utilities: Fix conntrack flush command")
Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com>
CC: Greg Rose <gvrose8192@gmail.com>
CC: Aaron Conole <aconole@redhat.com>
CC: Justin Pettit <jpettit@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Martin Xu
2018-07-30 22:47:18 -07:00
committed by Ben Pfaff
parent 7539bfafac
commit 9763d17fbd

View File

@@ -605,7 +605,9 @@ force_reload_kmod () {
stop_ovsdb
start_ovsdb || return 1
if [[ $(ovs-dpctl show) ]]; then
action "Flush old conntrack entries" ovs-appctl dpctl/flush-conntrack
fi
stop_forwarding
if action "Saving interface configuration" save_interfaces; then