[ovs-dev] [PATCH 1/2] ovs-ctl: Add option to delete transient ports only on boot.
Ben Pfaff
blp at ovn.org
Thu May 18 22:25:38 UTC 2017
On Fri, May 05, 2017 at 08:34:13PM +0200, Timothy Redaelli wrote:
> The first time after boot, when openvswitch is started by using
> --delete-transient-ports-on-boot ovs-ctl option, all transient ports will be
> removed.
>
> Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
> ---
> utilities/ovs-ctl.in | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
> index 575ffa03..c3130fa3 100755
> --- a/utilities/ovs-ctl.in
> +++ b/utilities/ovs-ctl.in
> @@ -189,6 +189,11 @@ do_start_ovsdb () {
> if test X"$DELETE_TRANSIENT_PORTS" = Xyes; then
> del_transient_ports
> fi
> + if test X"$DELETE_TRANSIENT_PORTS_ON_BOOT" = Xyes && \
> + ! test -f "$rundir/deleted_transient_ports"; then
> + del_transient_ports
> + : > "$rundir/deleted_transient_ports"
> + fi
> fi
> }
>
Hmm.
The Xenserver initscript, in xenserver/etc_init.d_openvswitch,
implements something a little like this by hand:
if test ! -e /var/run/openvswitch.booted; then
touch /var/run/openvswitch.booted
set "$@" --delete-bridges
fi
I don't know whether that's a strong precedent that the caller should
implement this kind of logic. But, if it's not, then I'd request that
this new option be documented in the ovs-ctl usage message and manpage.
Thanks,
Ben.
More information about the dev
mailing list