Message ID | 1528507993-3023-1-git-send-email-aginwala@ebay.com |
---|---|
State | Not Applicable |
Headers | show |
Series | None | expand |
On Sat, Jun 9, 2018 at 7:03 AM, aginwala <amginwal@gmail.com> wrote: > load balancer to manage ovndb clusters via pacemaker. > > This is will allow setting inactivity probe on the master node. > For pacemaker to manage ovndb resources via LB, we skipped creating > connection > table and hence the inactivity probe was getting set to 5000 by default. > In order to over-ride it we need this table. However, we need to skip > slaves > listening on local sb and nb connections table so that LB feature is > intact and only master is listening on 0.0.0.0 > > e.g --remote=db:OVN_Southbound,SB_Global,connections and > --remote=db:OVN_Northbound,NB_Global,connections > > will be skipped for slave SB and NB dbs respectively by unsetting > --db-sb-use-remote-in-db and --db-nb-use-remote-in-db in ovn-ctl. > > Signed-off-by: aginwala <aginwala@ebay.com> > Acked-by: Numan Siddique <nusiddiq@redhat.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@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
It's better to replace "ovndb-servers" to "ovndb-servers.ocf" in the title. Probably Ben will take care of that when applying the patch. Acked-by: Han Zhou <hzhou8@ebay.com> On Fri, Jun 8, 2018 at 6:33 PM, aginwala <amginwal@gmail.com> wrote: > load balancer to manage ovndb clusters via pacemaker. > > This is will allow setting inactivity probe on the master node. > For pacemaker to manage ovndb resources via LB, we skipped creating > connection > table and hence the inactivity probe was getting set to 5000 by default. > In order to over-ride it we need this table. However, we need to skip > slaves > listening on local sb and nb connections table so that LB feature is > intact and only master is listening on 0.0.0.0 > > e.g --remote=db:OVN_Southbound,SB_Global,connections and > --remote=db:OVN_Northbound,NB_Global,connections > > will be skipped for slave SB and NB dbs respectively by unsetting > --db-sb-use-remote-in-db and --db-nb-use-remote-in-db in ovn-ctl. > > Signed-off-by: aginwala <aginwala@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@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
On Thu, Jun 21, 2018 at 01:29:52AM +0530, Numan Siddique wrote: > On Sat, Jun 9, 2018 at 7:03 AM, aginwala <amginwal@gmail.com> wrote: > > > load balancer to manage ovndb clusters via pacemaker. > > > > This is will allow setting inactivity probe on the master node. > > For pacemaker to manage ovndb resources via LB, we skipped creating > > connection > > table and hence the inactivity probe was getting set to 5000 by default. > > In order to over-ride it we need this table. However, we need to skip > > slaves > > listening on local sb and nb connections table so that LB feature is > > intact and only master is listening on 0.0.0.0 > > > > e.g --remote=db:OVN_Southbound,SB_Global,connections and > > --remote=db:OVN_Northbound,NB_Global,connections > > > > will be skipped for slave SB and NB dbs respectively by unsetting > > --db-sb-use-remote-in-db and --db-nb-use-remote-in-db in ovn-ctl. > > > > Signed-off-by: aginwala <aginwala@ebay.com> > > > > Acked-by: Numan Siddique <nusiddiq@redhat.com> I applied this to master on the strength of the acks. I don't know enough about pacemaker to review it myself, so I just applied it verbatim. I think there was a request for a branch-2.9 backport, but the cherry-pick failed so I'll need assistance (probably a branch-2.9 post of the patches).
Hi Ben: I guess the cherry pick failed because of the dependency patch. Can you port https://patchwork.ozlabs.org/patch/925566/ to branch-2.9 as its pre-req for these patches and apply above two on top of that. It would work that way. Let me know further. Regards, On Thu, Jul 5, 2018 at 11:26 AM Ben Pfaff <blp@ovn.org> wrote: > On Thu, Jun 21, 2018 at 01:29:52AM +0530, Numan Siddique wrote: > > On Sat, Jun 9, 2018 at 7:03 AM, aginwala <amginwal@gmail.com> wrote: > > > > > load balancer to manage ovndb clusters via pacemaker. > > > > > > This is will allow setting inactivity probe on the master node. > > > For pacemaker to manage ovndb resources via LB, we skipped creating > > > connection > > > table and hence the inactivity probe was getting set to 5000 by > default. > > > In order to over-ride it we need this table. However, we need to skip > > > slaves > > > listening on local sb and nb connections table so that LB feature is > > > intact and only master is listening on 0.0.0.0 > > > > > > e.g --remote=db:OVN_Southbound,SB_Global,connections and > > > --remote=db:OVN_Northbound,NB_Global,connections > > > > > > will be skipped for slave SB and NB dbs respectively by unsetting > > > --db-sb-use-remote-in-db and --db-nb-use-remote-in-db in ovn-ctl. > > > > > > Signed-off-by: aginwala <aginwala@ebay.com> > > > > > > > Acked-by: Numan Siddique <nusiddiq@redhat.com> > > I applied this to master on the strength of the acks. I don't know > enough about pacemaker to review it myself, so I just applied it > verbatim. > > I think there was a request for a branch-2.9 backport, but the > cherry-pick failed so I'll need assistance (probably a branch-2.9 post > of the patches). > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
OK, that did it. I backported all three. On Mon, Jul 09, 2018 at 11:04:12AM -0700, aginwala wrote: > Hi Ben: > > I guess the cherry pick failed because of the dependency patch. Can you > port https://patchwork.ozlabs.org/patch/925566/ to branch-2.9 as its > pre-req for these patches and apply above two on top of that. It would work > that way. Let me know further. > > > > Regards, > > > On Thu, Jul 5, 2018 at 11:26 AM Ben Pfaff <blp@ovn.org> wrote: > > > On Thu, Jun 21, 2018 at 01:29:52AM +0530, Numan Siddique wrote: > > > On Sat, Jun 9, 2018 at 7:03 AM, aginwala <amginwal@gmail.com> wrote: > > > > > > > load balancer to manage ovndb clusters via pacemaker. > > > > > > > > This is will allow setting inactivity probe on the master node. > > > > For pacemaker to manage ovndb resources via LB, we skipped creating > > > > connection > > > > table and hence the inactivity probe was getting set to 5000 by > > default. > > > > In order to over-ride it we need this table. However, we need to skip > > > > slaves > > > > listening on local sb and nb connections table so that LB feature is > > > > intact and only master is listening on 0.0.0.0 > > > > > > > > e.g --remote=db:OVN_Southbound,SB_Global,connections and > > > > --remote=db:OVN_Northbound,NB_Global,connections > > > > > > > > will be skipped for slave SB and NB dbs respectively by unsetting > > > > --db-sb-use-remote-in-db and --db-nb-use-remote-in-db in ovn-ctl. > > > > > > > > Signed-off-by: aginwala <aginwala@ebay.com> > > > > > > > > > > Acked-by: Numan Siddique <nusiddiq@redhat.com> > > > > I applied this to master on the strength of the acks. I don't know > > enough about pacemaker to review it myself, so I just applied it > > verbatim. > > > > I think there was a request for a branch-2.9 backport, but the > > cherry-pick failed so I'll need assistance (probably a branch-2.9 post > > of the patches). > > _______________________________________________ > > dev mailing list > > dev@openvswitch.org > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > >
Cool! Thanks! On Mon, Jul 9, 2018 at 11:28 AM Ben Pfaff <blp@ovn.org> wrote: > OK, that did it. I backported all three. > > On Mon, Jul 09, 2018 at 11:04:12AM -0700, aginwala wrote: > > Hi Ben: > > > > I guess the cherry pick failed because of the dependency patch. Can you > > port https://patchwork.ozlabs.org/patch/925566/ to branch-2.9 as its > > pre-req for these patches and apply above two on top of that. It would > work > > that way. Let me know further. > > > > > > > > Regards, > > > > > > On Thu, Jul 5, 2018 at 11:26 AM Ben Pfaff <blp@ovn.org> wrote: > > > > > On Thu, Jun 21, 2018 at 01:29:52AM +0530, Numan Siddique wrote: > > > > On Sat, Jun 9, 2018 at 7:03 AM, aginwala <amginwal@gmail.com> wrote: > > > > > > > > > load balancer to manage ovndb clusters via pacemaker. > > > > > > > > > > This is will allow setting inactivity probe on the master node. > > > > > For pacemaker to manage ovndb resources via LB, we skipped creating > > > > > connection > > > > > table and hence the inactivity probe was getting set to 5000 by > > > default. > > > > > In order to over-ride it we need this table. However, we need to > skip > > > > > slaves > > > > > listening on local sb and nb connections table so that LB feature > is > > > > > intact and only master is listening on 0.0.0.0 > > > > > > > > > > e.g --remote=db:OVN_Southbound,SB_Global,connections and > > > > > --remote=db:OVN_Northbound,NB_Global,connections > > > > > > > > > > will be skipped for slave SB and NB dbs respectively by unsetting > > > > > --db-sb-use-remote-in-db and --db-nb-use-remote-in-db in ovn-ctl. > > > > > > > > > > Signed-off-by: aginwala <aginwala@ebay.com> > > > > > > > > > > > > > Acked-by: Numan Siddique <nusiddiq@redhat.com> > > > > > > I applied this to master on the strength of the acks. I don't know > > > enough about pacemaker to review it myself, so I just applied it > > > verbatim. > > > > > > I think there was a request for a branch-2.9 backport, but the > > > cherry-pick failed so I'll need assistance (probably a branch-2.9 post > > > of the patches). > > > _______________________________________________ > > > dev mailing list > > > dev@openvswitch.org > > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > > >
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
load balancer to manage ovndb clusters via pacemaker. This is will allow setting inactivity probe on the master node. For pacemaker to manage ovndb resources via LB, we skipped creating connection table and hence the inactivity probe was getting set to 5000 by default. In order to over-ride it we need this table. However, we need to skip slaves listening on local sb and nb connections table so that LB feature is intact and only master is listening on 0.0.0.0 e.g --remote=db:OVN_Southbound,SB_Global,connections and --remote=db:OVN_Northbound,NB_Global,connections will be skipped for slave SB and NB dbs respectively by unsetting --db-sb-use-remote-in-db and --db-nb-use-remote-in-db in ovn-ctl. Signed-off-by: aginwala <aginwala@ebay.com> --- ovn/utilities/ovndb-servers.ocf | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-)