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 <[email protected]> --- Changed since v1: * Added --delete-transient-ports-on-boot flag to manpage utilities/ovs-ctl.8 | 13 ++++++++++++- utilities/ovs-ctl.in | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/utilities/ovs-ctl.8 b/utilities/ovs-ctl.8 index 84fa33f..a15d729 100644 --- a/utilities/ovs-ctl.8 +++ b/utilities/ovs-ctl.8 @@ -95,11 +95,16 @@ bridges from the database. If the \fB\-\-delete\-transient\-ports\fR option was used, deletes all ports that have \fBother_config:transient\fR set to true. . +.IP 7. +If the \fB\-\-delete\-transient\-ports\-on\-boot\fR option was used, deletes +all ports that have \fBother_config:transient\fR set to true, but only the +first time after a boot. +. .PP The \fBstart\fR command skips the following step if \fBovs\-vswitchd\fR is already running, or if the \fB\-\-no\-ovs\-vswitchd\fR command option is given: -.IP 7. +.IP 8. Starts \fBovs\-vswitchd\fR. . .SS "Options" @@ -159,6 +164,12 @@ Deletes all ports that have the other_config:transient value set to true. This is important on certain environments where some ports are going to be recreated after reboot, but other ports need to be persisted in the database. . +.IP "\fB\-\-delete\-transient\-ports\-on\-boot\fR" +The first time after a boot, deletes all ports that have the +other_config:transient value set to true. This is important on certain +environments where some ports are going to be recreated after reboot, +but other ports need to be persisted in the database. +. .IP "\fB\-\-ovs\-user=user[:group]\fR" Ordinarily Open vSwitch daemons are started as the user invoking the ovs-ctl command. Some system administrators would prefer to have the various daemons diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in index 575ffa0..c3130fa 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 } @@ -503,6 +508,7 @@ set_defaults () { DELETE_BRIDGES=no DELETE_TRANSIENT_PORTS=no + DELETE_TRANSIENT_PORTS_ON_BOOT=no DAEMON_CWD=/ FORCE_COREFILES=yes -- 2.9.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
