[ovs-dev] [PATCH 2/2] ovndb-servers.ocf: Set connections in NB and SB DB tables,

Numan Siddique nusiddiq at redhat.com
Tue Jun 19 10:35:51 UTC 2018


On Tue, Jun 19, 2018 at 6:14 AM, Han Zhou <zhouhan at gmail.com> wrote:

>
>
> On Fri, Jun 8, 2018 at 12:32 PM, aginwala <amginwal at gmail.com> wrote:
> >
> > so that we can adjust inactivity_probe for master node, while still not
> > listening on TCP on slave node using use_remote_in_db in ovn-ctl.
> >
>
> Minor comment: the commit message is better to have a short summary as
> subject, and then the detailed descriptions.
>
> > Signed-off-by: aginwala <aginwala at ebay.com>
> > ---
> >  ovn/utilities/ovndb-servers.ocf | 39 +++++++++++++++++++++++-------
> ---------
> >  1 file changed, 23 insertions(+), 16 deletions(-)
> >
> > diff --git a/ovn/utilities/ovndb-servers.ocf
> b/ovn/utilities/ovndb-servers.ocf
> > index 9391b89..52141c7 100755
> > --- a/ovn/utilities/ovndb-servers.ocf
> > +++ b/ovn/utilities/ovndb-servers.ocf
> > @@ -172,25 +172,29 @@ ovsdb_server_notify() {
> >              ${OVN_CTL} --ovn-manage-ovsdb=no start_northd
> >          fi
> >
> > -        # Not needed while listening on 0.0.0.0 as we do not want to
> allow
> > -        # local binds. However, it is needed if vip ip is binded to
> nodes.
> > -        if [ "x${LISTEN_ON_MASTER_IP_ONLY}" = xyes ]; then
> > -            conn=`ovn-nbctl get NB_global . connections`
> > -            if [ "$conn" == "[]" ]
> > -            then
> > -                ovn-nbctl -- --id=@conn_uuid create Connection \
> > -target="p${NB_MASTER_PROTO}\:${NB_MASTER_PORT}\:${MASTER_IP}" \
> > +        # In order to over-ride inactivity_probe for LB use case, we
> need to
> > +        # create connection entry to listen on 0.0.0.0 for master node.
> > +        if [ "x${LISTEN_ON_MASTER_IP_ONLY}" = xno ]; then
> > +           LISTON_ON_IP="0.0.0.0"
> > +        else
> > +           LISTON_ON_IP=${MASTER_IP}
> > +        fi
> > +        conn=`ovn-nbctl get NB_global . connections`
> > +        if [ "$conn" == "[]" ]
> > +        then
> > +            ovn-nbctl -- --id=@conn_uuid create Connection \
> > +target="p${NB_MASTER_PROTO}\:${NB_MASTER_PORT}\:${LISTON_ON_IP}" \
> >  inactivity_probe=$INACTIVE_PROBE -- set NB_Global .
> connections=@conn_uuid
> > -            fi
> > +        fi
> >
> > -            conn=`ovn-sbctl get SB_global . connections`
> > -            if [ "$conn" == "[]" ]
> > -            then
> > -                ovn-sbctl -- --id=@conn_uuid create Connection \
> > -target="p${SB_MASTER_PROTO}\:${SB_MASTER_PORT}\:${MASTER_IP}" \
> > +        conn=`ovn-sbctl get SB_global . connections`
> > +        if [ "$conn" == "[]" ]
> > +        then
> > +            ovn-sbctl -- --id=@conn_uuid create Connection \
> > +target="p${SB_MASTER_PROTO}\:${SB_MASTER_PORT}\:${LISTON_ON_IP}" \
> >  inactivity_probe=$INACTIVE_PROBE -- set SB_Global .
> connections=@conn_uuid
> > -            fi
> >          fi
> > +
> >      else
> >          if [ "$MANAGE_NORTHD" = "yes" ]; then
> >              # Stop ovn-northd service. Set --ovn-manage-ovsdb=no so that
> > @@ -355,7 +359,10 @@ ovsdb_server_start() {
> >          set $@ --db-nb-sync-from-proto=${NB_MASTER_PROTO}
> >          set $@ --db-sb-sync-from-port=${SB_MASTER_PORT}
> >          set $@ --db-sb-sync-from-proto=${SB_MASTER_PROTO}
> > -
> > +        if [ "x${LISTEN_ON_MASTER_IP_ONLY}" = xno ]; then
> > +            set $@ --db-sb-use-remote-in-db="no"
> > +            set $@ --db-nb-use-remote-in-db="no"
> > +        fi
> >      fi
> >
> >      $@ start_ovsdb
> > --
> > 1.9.1
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
> Acked-by: Han Zhou <hzhou8 at ebay.com>
>



Acked-by: Numan Siddique <nusiddiq at redhat.com>

Agree with Han. The commit message may be a bit clearer.


More information about the dev mailing list