[ovs-dev] [PATCH 2/2] ovn: Modify restart_controller in ovn-ctl to use --restart

Jakub Sitnicki jkbs at redhat.com
Mon Jul 30 11:06:00 UTC 2018


On Tue, 24 Jul 2018 16:30:06 -0400
Mark Michelson <mmichels at redhat.com> wrote:

> The --restart flag allows for uninterrupted packet flowage when exiting
> ovn-controller. This patch modifies the restart_controller argument to
> ovn-ctl to use --restart.
> 
> Signed-off-by: Mark Michelson <mmichels at redhat.com>
> ---
>  ovn/utilities/ovn-ctl | 4 ++--
>  utilities/ovs-lib.in  | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl
> index 2fce47714..f76248e84 100755
> --- a/ovn/utilities/ovn-ctl
> +++ b/ovn/utilities/ovn-ctl
> @@ -350,7 +350,7 @@ stop_northd () {
>  }
>  
>  stop_controller () {
> -    OVS_RUNDIR=${OVN_RUNDIR} stop_daemon ovn-controller
> +    OVS_RUNDIR=${OVN_RUNDIR} stop_daemon ovn-controller $1
>  }

Might be less surprising if the wrapper passed all arguments
to the target command, but this works too.

>  
>  stop_controller_vtep () {
> @@ -367,7 +367,7 @@ restart_northd () {
>  }
>  
>  restart_controller () {
> -    stop_controller
> +    stop_controller --restart
>      start_controller
>  }
>  
> diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
> index 92f98ad92..9f62dfd25 100644
> --- a/utilities/ovs-lib.in
> +++ b/utilities/ovs-lib.in
> @@ -258,7 +258,7 @@ stop_daemon () {
>                  case $action in
>                      EXIT)
>                          action "Exiting $1 ($pid)" \
> -                            ${bindir}/ovs-appctl -T 1 -t $rundir/$1.$pid.ctl exit
> +                            ${bindir}/ovs-appctl -T 1 -t $rundir/$1.$pid.ctl exit $2
>                          ;;
>                      TERM)
>                          action "Killing $1 ($pid)" kill $pid



More information about the dev mailing list