diff options
author | Gurucharan Shetty <gshetty@nicira.com> | 2012-10-26 11:17:17 -0700 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2012-10-26 12:26:55 -0700 |
commit | 49770faf0d497e2a0b07f43163728c17b3e7363b (patch) | |
tree | 32c94eea97a8951d113a2fcea3d4081973238ca9 /utilities/ovs-save | |
parent | 85b53b3110a1c97c4eaaf647adb8ab8afbeba0e7 (diff) | |
download | openvswitch-49770faf0d497e2a0b07f43163728c17b3e7363b.tar.gz |
ovs-save: Use timeout option for ovs-vsctl
Running ovs-save directly to save datapath configuration can
wait forever if ovsdb-server is not running. Use a timeout.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Diffstat (limited to 'utilities/ovs-save')
-rwxr-xr-x | utilities/ovs-save | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/utilities/ovs-save b/utilities/ovs-save index 9ed14ebb3..01e57914e 100755 --- a/utilities/ovs-save +++ b/utilities/ovs-save @@ -177,6 +177,10 @@ save_flows () { done } +ovs_vsctl () { + ovs-vsctl --no-wait --timeout=5 "$@" +} + save_datapaths () { if missing_program ovs-dpctl; then echo "$0: ovs-dpctl not found in $PATH" >&2 @@ -225,20 +229,20 @@ save_datapaths () { # For ipsec, ovs-dpctl does not show the key value pairs related # to certificates. Get that information from ovs-vsctl. if [ "${type}" = "ipsec_gre" ] ; then - if peer_cert=`ovs-vsctl get interface \ + if peer_cert=`ovs_vsctl get interface \ "${netdev}" options:peer_cert 2>/dev/null`; then # The option peer_cert comes with an accompanying # "certificate" or "use_ssl_cert" - if certificate=`ovs-vsctl get interface "${netdev}" \ + if certificate=`ovs_vsctl get interface "${netdev}" \ options:certificate 2>/dev/null` ; then command="${command},peer_cert=${peer_cert},certificate=${certificate}" else - use_ssl_cert=`ovs-vsctl get interface "${netdev}" \ + use_ssl_cert=`ovs_vsctl get interface "${netdev}" \ options:use_ssl_cert 2>/dev/null` command="${command},peer_cert=${peer_cert},use_ssl_cert=${use_ssl_cert}" fi else - psk=`ovs-vsctl get interface "${netdev}" \ + psk=`ovs_vsctl get interface "${netdev}" \ options:psk 2>/dev/null` command="${command},psk=${psk}" fi |