[{"id":1772698,"web_url":"http://patchwork.ozlabs.org/comment/1772698/","msgid":"<CAC3B9fn6SVBiNV79OHJ3Xdcp1XnC=O2TvZogf=CZNi5pF0coBQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-21T11:17:09","subject":"Re: [ovs-dev] [PATCH RFC 39/52] ovn-sbctl: Allow retries by default.","submitter":{"id":67170,"url":"http://patchwork.ozlabs.org/api/people/67170/","name":"Miguel Angel Ajo","email":"majopela@redhat.com"},"content":"Makes sense. Is there any way to control the number of retries, and the\nretry time?\n\nAcked-by: Miguel Angel Ajo <majopela@redhat.com>\n\nOn Wed, Sep 20, 2017 at 12:01 AM, Ben Pfaff <blp@ovn.org> wrote:\n\n> Most of the OVS database-manipulation utilities (ovn-sbctl, ovn-nbctl,\n> ovs-vsctl, vtep-ctl) don't retry their connections by default because\n> they assume that the database is either up or down and likely to stay\n> that way.  The OVN southbound database, however, is a likely candidate\n> for high availability clustering, so that even if it appears to be\n> down for a moment it will be available again soon.  So, prepare for\n> the clustering implementation by enabling retry by default in\n> ovn-sbctl.\n>\n> Signed-off-by: Ben Pfaff <blp@ovn.org>\n> ---\n>  ovn/utilities/ovn-sbctl.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c\n> index 7af5863b08fc..f4452fa6ee85 100644\n> --- a/ovn/utilities/ovn-sbctl.c\n> +++ b/ovn/utilities/ovn-sbctl.c\n> @@ -120,7 +120,7 @@ main(int argc, char *argv[])\n>      }\n>\n>      /* Initialize IDL. */\n> -    idl = the_idl = ovsdb_idl_create(db, &sbrec_idl_class, false, false);\n> +    idl = the_idl = ovsdb_idl_create(db, &sbrec_idl_class, false, true);\n>      run_prerequisites(commands, n_commands, idl);\n>\n>      /* Execute the commands.\n> --\n> 2.10.2\n>\n> _______________________________________________\n> dev mailing list\n> dev@openvswitch.org\n> https://mail.openvswitch.org/mailman/listinfo/ovs-dev\n>","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xyYwq0Xylz9sP1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 21:17:15 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 20955CB8;\n\tThu, 21 Sep 2017 11:17:13 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 37543CB7\n\tfor <dev@openvswitch.org>; Thu, 21 Sep 2017 11:17:12 +0000 (UTC)","from mail-wr0-f171.google.com (mail-wr0-f171.google.com\n\t[209.85.128.171])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8496017E\n\tfor <dev@openvswitch.org>; Thu, 21 Sep 2017 11:17:11 +0000 (UTC)","by mail-wr0-f171.google.com with SMTP id o42so4291567wrb.3\n\tfor <dev@openvswitch.org>; Thu, 21 Sep 2017 04:17:11 -0700 (PDT)","by 10.28.174.69 with HTTP; Thu, 21 Sep 2017 04:17:09 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=9u50FdHLBkQzTUeVorOWyOkqNCVdmnYxmhCXgcGSUXw=;\n\tb=e7FSoEDx7Sm0sGVmzGTzNU+N8X3P+DeHMzblFMNvXhima0irXdjffZ1mH82cDg/ueJ\n\t5MNBnmxlFvTYbyc1UCoEpyi6OiGJmleM7lU9HqK2HLPBNbWgJrntsDZxNirnEpvtYNxy\n\ttrrixDjhxegpd4eegA1XmvtFILGFHmbUaLatxzbKcDhVSVNv6owLWcXRW6dLdyj1LOd2\n\ttxErB7MFK9dHVuKg3xxuTXU6YyrmZdzkGq2WMf9IHkpf4LcrQZ7ZE4jtGrsFzz7feO4v\n\tWBx4yR42oz8KACwjRX/mThmqNWIgi8hS0rk/6FCMpr40Rg9DO0oVHvFkNaE1ssyaqXJI\n\tQoVg==","X-Gm-Message-State":"AHPjjUgSyZV0WCBtNilzNzjN6sLMEZuYnC5jKw28pq1GakJ8jRa7IZ9e\n\tWMJuqKXo+I4zAXOTKMwRjcThFK0FwSZoF1ASLzgaggjX","X-Google-Smtp-Source":"AOwi7QCXMrOfLYG3UAQFm708SVswngP6yaKT/8qXd/K/dlFLDyrgbZPxOwmi0DdYXwIt35itjAfLvBroFlUskYVvy3c=","X-Received":"by 10.223.197.141 with SMTP id m13mr1699819wrg.203.1505992630227;\n\tThu, 21 Sep 2017 04:17:10 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170919220125.32535-40-blp@ovn.org>","References":"<20170919220125.32535-1-blp@ovn.org>\n\t<20170919220125.32535-40-blp@ovn.org>","From":"Miguel Angel Ajo Pelayo <majopela@redhat.com>","Date":"Thu, 21 Sep 2017 13:17:09 +0200","Message-ID":"<CAC3B9fn6SVBiNV79OHJ3Xdcp1XnC=O2TvZogf=CZNi5pF0coBQ@mail.gmail.com>","To":"Ben Pfaff <blp@ovn.org>","X-Spam-Status":"No, score=0.0 required=5.0 tests=HTML_MESSAGE,\n\tRCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","X-Content-Filtered-By":"Mailman/MimeDel 2.1.12","Cc":"ovs dev <dev@openvswitch.org>","Subject":"Re: [ovs-dev] [PATCH RFC 39/52] ovn-sbctl: Allow retries by default.","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1773842,"web_url":"http://patchwork.ozlabs.org/comment/1773842/","msgid":"<20170922194832.GD15629@ovn.org>","list_archive_url":null,"date":"2017-09-22T19:48:32","subject":"Re: [ovs-dev] [PATCH RFC 39/52] ovn-sbctl: Allow retries by default.","submitter":{"id":67603,"url":"http://patchwork.ozlabs.org/api/people/67603/","name":"Ben Pfaff","email":"blp@ovn.org"},"content":"Thank you for the review.\n\nThere isn't currently a way to control the number of retries.  If that\nis a valuable feature, then it could be added.\n\nYou can control the timeout for these utilities with the --timeout\noption (or use the \"timeout\" program from GNU coreutils).\n\nOn Thu, Sep 21, 2017 at 01:17:09PM +0200, Miguel Angel Ajo Pelayo wrote:\n> Makes sense. Is there any way to control the number of retries, and the\n> retry time?\n> \n> Acked-by: Miguel Angel Ajo <majopela@redhat.com>\n> \n> On Wed, Sep 20, 2017 at 12:01 AM, Ben Pfaff <blp@ovn.org> wrote:\n> \n> > Most of the OVS database-manipulation utilities (ovn-sbctl, ovn-nbctl,\n> > ovs-vsctl, vtep-ctl) don't retry their connections by default because\n> > they assume that the database is either up or down and likely to stay\n> > that way.  The OVN southbound database, however, is a likely candidate\n> > for high availability clustering, so that even if it appears to be\n> > down for a moment it will be available again soon.  So, prepare for\n> > the clustering implementation by enabling retry by default in\n> > ovn-sbctl.\n> >\n> > Signed-off-by: Ben Pfaff <blp@ovn.org>\n> > ---\n> >  ovn/utilities/ovn-sbctl.c | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c\n> > index 7af5863b08fc..f4452fa6ee85 100644\n> > --- a/ovn/utilities/ovn-sbctl.c\n> > +++ b/ovn/utilities/ovn-sbctl.c\n> > @@ -120,7 +120,7 @@ main(int argc, char *argv[])\n> >      }\n> >\n> >      /* Initialize IDL. */\n> > -    idl = the_idl = ovsdb_idl_create(db, &sbrec_idl_class, false, false);\n> > +    idl = the_idl = ovsdb_idl_create(db, &sbrec_idl_class, false, true);\n> >      run_prerequisites(commands, n_commands, idl);\n> >\n> >      /* Execute the commands.\n> > --\n> > 2.10.2\n> >\n> > _______________________________________________\n> > dev mailing list\n> > dev@openvswitch.org\n> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev\n> >","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xzPDW6MStz9sPr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 23 Sep 2017 05:48:43 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 80290B01;\n\tFri, 22 Sep 2017 19:48:40 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 0122EB00\n\tfor <dev@openvswitch.org>; Fri, 22 Sep 2017 19:48:39 +0000 (UTC)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 78BC54B0\n\tfor <dev@openvswitch.org>; Fri, 22 Sep 2017 19:48:38 +0000 (UTC)","from ovn.org (unknown [208.91.2.3])\n\t(Authenticated sender: blp@ovn.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 251EA172094;\n\tFri, 22 Sep 2017 21:48:35 +0200 (CEST)"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-Originating-IP":"208.91.2.3","Date":"Fri, 22 Sep 2017 12:48:32 -0700","From":"Ben Pfaff <blp@ovn.org>","To":"Miguel Angel Ajo Pelayo <majopela@redhat.com>","Message-ID":"<20170922194832.GD15629@ovn.org>","References":"<20170919220125.32535-1-blp@ovn.org>\n\t<20170919220125.32535-40-blp@ovn.org>\n\t<CAC3B9fn6SVBiNV79OHJ3Xdcp1XnC=O2TvZogf=CZNi5pF0coBQ@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAC3B9fn6SVBiNV79OHJ3Xdcp1XnC=O2TvZogf=CZNi5pF0coBQ@mail.gmail.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW\n\tautolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"ovs dev <dev@openvswitch.org>","Subject":"Re: [ovs-dev] [PATCH RFC 39/52] ovn-sbctl: Allow retries by default.","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1774534,"web_url":"http://patchwork.ozlabs.org/comment/1774534/","msgid":"<CAC3B9fkNR2XsXWYZSOUs6FTxkvU+mLgjNaB7PG33-f2VcREj3g@mail.gmail.com>","list_archive_url":null,"date":"2017-09-25T08:53:09","subject":"Re: [ovs-dev] [PATCH RFC 39/52] ovn-sbctl: Allow retries by default.","submitter":{"id":67170,"url":"http://patchwork.ozlabs.org/api/people/67170/","name":"Miguel Angel Ajo","email":"majopela@redhat.com"},"content":"It makes sense.\n\nAs an idea for future improvements (also applicable to the python client\nand the ovsdbapp): something that I've found valuable in distributed\nsystems is the ability to set an exponential retry time (with a ceiling)\nbecause it's a good failsafe mechanism when one of the clients sends some\nsort of big/buggy request that it's going to trigger a failure/long\nexecution time on the server and finally timeout.\n\nThe exponential backoff makes it more likely than the server will recover,\nor have time to serve other clients.\n\nOn Fri, Sep 22, 2017 at 9:48 PM, Ben Pfaff <blp@ovn.org> wrote:\n\n> Thank you for the review.\n>\n> There isn't currently a way to control the number of retries.  If that\n> is a valuable feature, then it could be added.\n>\n> You can control the timeout for these utilities with the --timeout\n> option (or use the \"timeout\" program from GNU coreutils).\n>\n> On Thu, Sep 21, 2017 at 01:17:09PM +0200, Miguel Angel Ajo Pelayo wrote:\n> > Makes sense. Is there any way to control the number of retries, and the\n> > retry time?\n> >\n> > Acked-by: Miguel Angel Ajo <majopela@redhat.com>\n> >\n> > On Wed, Sep 20, 2017 at 12:01 AM, Ben Pfaff <blp@ovn.org> wrote:\n> >\n> > > Most of the OVS database-manipulation utilities (ovn-sbctl, ovn-nbctl,\n> > > ovs-vsctl, vtep-ctl) don't retry their connections by default because\n> > > they assume that the database is either up or down and likely to stay\n> > > that way.  The OVN southbound database, however, is a likely candidate\n> > > for high availability clustering, so that even if it appears to be\n> > > down for a moment it will be available again soon.  So, prepare for\n> > > the clustering implementation by enabling retry by default in\n> > > ovn-sbctl.\n> > >\n> > > Signed-off-by: Ben Pfaff <blp@ovn.org>\n> > > ---\n> > >  ovn/utilities/ovn-sbctl.c | 2 +-\n> > >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > >\n> > > diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c\n> > > index 7af5863b08fc..f4452fa6ee85 100644\n> > > --- a/ovn/utilities/ovn-sbctl.c\n> > > +++ b/ovn/utilities/ovn-sbctl.c\n> > > @@ -120,7 +120,7 @@ main(int argc, char *argv[])\n> > >      }\n> > >\n> > >      /* Initialize IDL. */\n> > > -    idl = the_idl = ovsdb_idl_create(db, &sbrec_idl_class, false,\n> false);\n> > > +    idl = the_idl = ovsdb_idl_create(db, &sbrec_idl_class, false,\n> true);\n> > >      run_prerequisites(commands, n_commands, idl);\n> > >\n> > >      /* Execute the commands.\n> > > --\n> > > 2.10.2\n> > >\n> > > _______________________________________________\n> > > dev mailing list\n> > > dev@openvswitch.org\n> > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev\n> > >\n>","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y0yXt50Kpz9s76\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 18:53:17 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 8359B93E;\n\tMon, 25 Sep 2017 08:53:13 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 090CD71F\n\tfor <dev@openvswitch.org>; Mon, 25 Sep 2017 08:53:12 +0000 (UTC)","from mail-wm0-f41.google.com (mail-wm0-f41.google.com\n\t[74.125.82.41])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 35E17157\n\tfor <dev@openvswitch.org>; Mon, 25 Sep 2017 08:53:11 +0000 (UTC)","by mail-wm0-f41.google.com with SMTP id q124so17140138wmb.0\n\tfor <dev@openvswitch.org>; Mon, 25 Sep 2017 01:53:11 -0700 (PDT)","by 10.28.174.69 with HTTP; Mon, 25 Sep 2017 01:53:09 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=5m0KzZr3nN8svZf3+5cLKOaeQl0SBmYviMEOjcrNh7k=;\n\tb=l+AZdoVXwiTY1IG2nrLZQJZTFjmZ1vLT8LUgwrIz2svoOSOqwMmNho+mCQcBfsMxBm\n\t1zDT7Gya8/H2ueLn/Y/Efr0dVYFv4SoRthpNLtxTNz8RcjsR+cKyVuIppqu5a9OVQP2W\n\tSUMh1Cl7BOfqu8ASx5O8BHmIblDtRayuIxXDQ/2EiMKvEnSmP0jdbCu6U8WVm5EQR53S\n\tZM3ynN8nocy/SwnxDTPipn9SGfuA9vI/xC3EcpjH+C++mjmtmF2h/yXLvgveTp4bN4ge\n\tpM+hFnrNcSUllmZRGjSKhEYUaCdzfS/mbgrOo+uMK7/40E7xpcXRKTsIyNpvq4LryCOr\n\tNoow==","X-Gm-Message-State":"AHPjjUjEGgPhXLED5vMb2M2L92Ap8Ht0FA/SyZftnpjueyLEvvHO4MRH\n\tBsrntnUH7E6oS7V162XBUX5fEQPGJMlmEKd/ikr7sOMS","X-Google-Smtp-Source":"AOwi7QBcnLhMWAj4RafYE7qTes9ODUjwshsw42rpo5j4BNvel0Eam6wc/uG6GpR+vwf1CVVdIGtDeJe+pD8oTF9dlkI=","X-Received":"by 10.28.94.85 with SMTP id s82mr8567823wmb.13.1506329589789;\n\tMon, 25 Sep 2017 01:53:09 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170922194832.GD15629@ovn.org>","References":"<20170919220125.32535-1-blp@ovn.org>\n\t<20170919220125.32535-40-blp@ovn.org>\n\t<CAC3B9fn6SVBiNV79OHJ3Xdcp1XnC=O2TvZogf=CZNi5pF0coBQ@mail.gmail.com>\n\t<20170922194832.GD15629@ovn.org>","From":"Miguel Angel Ajo Pelayo <majopela@redhat.com>","Date":"Mon, 25 Sep 2017 10:53:09 +0200","Message-ID":"<CAC3B9fkNR2XsXWYZSOUs6FTxkvU+mLgjNaB7PG33-f2VcREj3g@mail.gmail.com>","To":"Ben Pfaff <blp@ovn.org>","X-Spam-Status":"No, score=0.0 required=5.0 tests=HTML_MESSAGE,\n\tRCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","X-Content-Filtered-By":"Mailman/MimeDel 2.1.12","Cc":"ovs dev <dev@openvswitch.org>","Subject":"Re: [ovs-dev] [PATCH RFC 39/52] ovn-sbctl: Allow retries by default.","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1774696,"web_url":"http://patchwork.ozlabs.org/comment/1774696/","msgid":"<20170925123435.GI15629@ovn.org>","list_archive_url":null,"date":"2017-09-25T12:34:35","subject":"Re: [ovs-dev] [PATCH RFC 39/52] ovn-sbctl: Allow retries by default.","submitter":{"id":67603,"url":"http://patchwork.ozlabs.org/api/people/67603/","name":"Ben Pfaff","email":"blp@ovn.org"},"content":"OVS has that already too, but the retry time caps out at 8 seconds\ncurrently.  It goes from 1 to 2 to 4 to 8 seconds.  The maximum could\neasily be raised.  I don't know a good way to decide what the maximum\nshould be.\n\nPossibly, it should be a random time within a range, to avoid\nsynchronizing clients' retries when a server goes down.  That is not yet\nimplemented (I just thought of it now).\n\nOn Mon, Sep 25, 2017 at 10:53:09AM +0200, Miguel Angel Ajo Pelayo wrote:\n> It makes sense.\n> \n> As an idea for future improvements (also applicable to the python client\n> and the ovsdbapp): something that I've found valuable in distributed\n> systems is the ability to set an exponential retry time (with a ceiling)\n> because it's a good failsafe mechanism when one of the clients sends some\n> sort of big/buggy request that it's going to trigger a failure/long\n> execution time on the server and finally timeout.\n> \n> The exponential backoff makes it more likely than the server will recover,\n> or have time to serve other clients.\n> \n> On Fri, Sep 22, 2017 at 9:48 PM, Ben Pfaff <blp@ovn.org> wrote:\n> \n> > Thank you for the review.\n> >\n> > There isn't currently a way to control the number of retries.  If that\n> > is a valuable feature, then it could be added.\n> >\n> > You can control the timeout for these utilities with the --timeout\n> > option (or use the \"timeout\" program from GNU coreutils).\n> >\n> > On Thu, Sep 21, 2017 at 01:17:09PM +0200, Miguel Angel Ajo Pelayo wrote:\n> > > Makes sense. Is there any way to control the number of retries, and the\n> > > retry time?\n> > >\n> > > Acked-by: Miguel Angel Ajo <majopela@redhat.com>\n> > >\n> > > On Wed, Sep 20, 2017 at 12:01 AM, Ben Pfaff <blp@ovn.org> wrote:\n> > >\n> > > > Most of the OVS database-manipulation utilities (ovn-sbctl, ovn-nbctl,\n> > > > ovs-vsctl, vtep-ctl) don't retry their connections by default because\n> > > > they assume that the database is either up or down and likely to stay\n> > > > that way.  The OVN southbound database, however, is a likely candidate\n> > > > for high availability clustering, so that even if it appears to be\n> > > > down for a moment it will be available again soon.  So, prepare for\n> > > > the clustering implementation by enabling retry by default in\n> > > > ovn-sbctl.\n> > > >\n> > > > Signed-off-by: Ben Pfaff <blp@ovn.org>\n> > > > ---\n> > > >  ovn/utilities/ovn-sbctl.c | 2 +-\n> > > >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > > >\n> > > > diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c\n> > > > index 7af5863b08fc..f4452fa6ee85 100644\n> > > > --- a/ovn/utilities/ovn-sbctl.c\n> > > > +++ b/ovn/utilities/ovn-sbctl.c\n> > > > @@ -120,7 +120,7 @@ main(int argc, char *argv[])\n> > > >      }\n> > > >\n> > > >      /* Initialize IDL. */\n> > > > -    idl = the_idl = ovsdb_idl_create(db, &sbrec_idl_class, false,\n> > false);\n> > > > +    idl = the_idl = ovsdb_idl_create(db, &sbrec_idl_class, false,\n> > true);\n> > > >      run_prerequisites(commands, n_commands, idl);\n> > > >\n> > > >      /* Execute the commands.\n> > > > --\n> > > > 2.10.2\n> > > >\n> > > > _______________________________________________\n> > > > dev mailing list\n> > > > dev@openvswitch.org\n> > > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev\n> > > >\n> >","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y13ST46F2z9tX3\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 22:34:49 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 106C1AB2;\n\tMon, 25 Sep 2017 12:34:47 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id B056FA7C\n\tfor <dev@openvswitch.org>; Mon, 25 Sep 2017 12:34:44 +0000 (UTC)","from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id EE9401A6\n\tfor <dev@openvswitch.org>; Mon, 25 Sep 2017 12:34:43 +0000 (UTC)","from ovn.org (173-228-112-34.dsl.dynamic.fusionbroadband.com\n\t[173.228.112.34]) (Authenticated sender: blp@ovn.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id C8EA8A80E6;\n\tMon, 25 Sep 2017 14:34:39 +0200 (CEST)"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-Originating-IP":"173.228.112.34","Date":"Mon, 25 Sep 2017 05:34:35 -0700","From":"Ben Pfaff <blp@ovn.org>","To":"Miguel Angel Ajo Pelayo <majopela@redhat.com>","Message-ID":"<20170925123435.GI15629@ovn.org>","References":"<20170919220125.32535-1-blp@ovn.org>\n\t<20170919220125.32535-40-blp@ovn.org>\n\t<CAC3B9fn6SVBiNV79OHJ3Xdcp1XnC=O2TvZogf=CZNi5pF0coBQ@mail.gmail.com>\n\t<20170922194832.GD15629@ovn.org>\n\t<CAC3B9fkNR2XsXWYZSOUs6FTxkvU+mLgjNaB7PG33-f2VcREj3g@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAC3B9fkNR2XsXWYZSOUs6FTxkvU+mLgjNaB7PG33-f2VcREj3g@mail.gmail.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW\n\tautolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"ovs dev <dev@openvswitch.org>","Subject":"Re: [ovs-dev] [PATCH RFC 39/52] ovn-sbctl: Allow retries by default.","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1775521,"web_url":"http://patchwork.ozlabs.org/comment/1775521/","msgid":"<CAC3B9fnakN25DttN2yVzaF7EOvMZCTQfr6tMjnG6P5_mBps+JQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-26T13:45:07","subject":"Re: [ovs-dev] [PATCH RFC 39/52] ovn-sbctl: Allow retries by default.","submitter":{"id":67170,"url":"http://patchwork.ozlabs.org/api/people/67170/","name":"Miguel Angel Ajo","email":"majopela@redhat.com"},"content":"Wow, great :)\n\nHaving random cap times within a range sounds like a nice improvement,\nthat's a good idea.\n\nOn Mon, Sep 25, 2017 at 2:34 PM, Ben Pfaff <blp@ovn.org> wrote:\n\n> OVS has that already too, but the retry time caps out at 8 seconds\n> currently.  It goes from 1 to 2 to 4 to 8 seconds.  The maximum could\n> easily be raised.  I don't know a good way to decide what the maximum\n> should be.\n>\n> Possibly, it should be a random time within a range, to avoid\n> synchronizing clients' retries when a server goes down.  That is not yet\n> implemented (I just thought of it now).\n>\n> On Mon, Sep 25, 2017 at 10:53:09AM +0200, Miguel Angel Ajo Pelayo wrote:\n> > It makes sense.\n> >\n> > As an idea for future improvements (also applicable to the python client\n> > and the ovsdbapp): something that I've found valuable in distributed\n> > systems is the ability to set an exponential retry time (with a ceiling)\n> > because it's a good failsafe mechanism when one of the clients sends some\n> > sort of big/buggy request that it's going to trigger a failure/long\n> > execution time on the server and finally timeout.\n> >\n> > The exponential backoff makes it more likely than the server will\n> recover,\n> > or have time to serve other clients.\n> >\n> > On Fri, Sep 22, 2017 at 9:48 PM, Ben Pfaff <blp@ovn.org> wrote:\n> >\n> > > Thank you for the review.\n> > >\n> > > There isn't currently a way to control the number of retries.  If that\n> > > is a valuable feature, then it could be added.\n> > >\n> > > You can control the timeout for these utilities with the --timeout\n> > > option (or use the \"timeout\" program from GNU coreutils).\n> > >\n> > > On Thu, Sep 21, 2017 at 01:17:09PM +0200, Miguel Angel Ajo Pelayo\n> wrote:\n> > > > Makes sense. Is there any way to control the number of retries, and\n> the\n> > > > retry time?\n> > > >\n> > > > Acked-by: Miguel Angel Ajo <majopela@redhat.com>\n> > > >\n> > > > On Wed, Sep 20, 2017 at 12:01 AM, Ben Pfaff <blp@ovn.org> wrote:\n> > > >\n> > > > > Most of the OVS database-manipulation utilities (ovn-sbctl,\n> ovn-nbctl,\n> > > > > ovs-vsctl, vtep-ctl) don't retry their connections by default\n> because\n> > > > > they assume that the database is either up or down and likely to\n> stay\n> > > > > that way.  The OVN southbound database, however, is a likely\n> candidate\n> > > > > for high availability clustering, so that even if it appears to be\n> > > > > down for a moment it will be available again soon.  So, prepare for\n> > > > > the clustering implementation by enabling retry by default in\n> > > > > ovn-sbctl.\n> > > > >\n> > > > > Signed-off-by: Ben Pfaff <blp@ovn.org>\n> > > > > ---\n> > > > >  ovn/utilities/ovn-sbctl.c | 2 +-\n> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > > > >\n> > > > > diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c\n> > > > > index 7af5863b08fc..f4452fa6ee85 100644\n> > > > > --- a/ovn/utilities/ovn-sbctl.c\n> > > > > +++ b/ovn/utilities/ovn-sbctl.c\n> > > > > @@ -120,7 +120,7 @@ main(int argc, char *argv[])\n> > > > >      }\n> > > > >\n> > > > >      /* Initialize IDL. */\n> > > > > -    idl = the_idl = ovsdb_idl_create(db, &sbrec_idl_class, false,\n> > > false);\n> > > > > +    idl = the_idl = ovsdb_idl_create(db, &sbrec_idl_class, false,\n> > > true);\n> > > > >      run_prerequisites(commands, n_commands, idl);\n> > > > >\n> > > > >      /* Execute the commands.\n> > > > > --\n> > > > > 2.10.2\n> > > > >\n> > > > > _______________________________________________\n> > > > > dev mailing list\n> > > > > dev@openvswitch.org\n> > > > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev\n> > > > >\n> > >\n>","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1hzJ6mYzz9t3m\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 23:45:16 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id A7900AD6;\n\tTue, 26 Sep 2017 13:45:11 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 51E5D957\n\tfor <dev@openvswitch.org>; Tue, 26 Sep 2017 13:45:10 +0000 (UTC)","from mail-wm0-f46.google.com (mail-wm0-f46.google.com\n\t[74.125.82.46])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 70386D3\n\tfor <dev@openvswitch.org>; Tue, 26 Sep 2017 13:45:09 +0000 (UTC)","by mail-wm0-f46.google.com with SMTP id m127so8057761wmm.3\n\tfor <dev@openvswitch.org>; Tue, 26 Sep 2017 06:45:09 -0700 (PDT)","by 10.28.174.69 with HTTP; Tue, 26 Sep 2017 06:45:07 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=W5pDEhIJRn12VyRLpcqzao7M0q8eJt9sOvNi0PA6nCc=;\n\tb=VPlwWc6cQFZehvHvLCPza2kPJNKTNs7/r+gOcK6HObJzDwIPy9xN8R6hzm1USipoc+\n\t5vvaZLikEJQ/69mQRoZmBspzOUX1FIRTY/X5x/TWGo74R0bZqrz7keG7XczCbfYSyNCU\n\ttjVHdG7xMvnkNYobg1OngTR7RnlEPaH+pp27ub+Lzm9iqyDV1m2ganF3qq+Knq+ginTg\n\tJRkxG1j6UETbOBFXZSF799JDsO8Vh0tBuy0Q2/RVkFq0qbhyNk5m0arz+pjXsvmF5/0z\n\tPMvklNm3LSrHYT2173i2nIsm95K2SFzjCfUYjFhYrsgTM5MvpFdKmvCeycdOWI0cB5C3\n\tLoSA==","X-Gm-Message-State":"AHPjjUj3khGjZYaIawA2lQA76s9BRoJ7rUs2uTBHaY0iOj8cud5gh0vh\n\tVgneWGxtbb62A/A9dRpuS5ki5J2OIXjyPavb9IDohti9","X-Google-Smtp-Source":"AOwi7QBOQHyqcuOqxu3EgvaOd49Jj3P0zap95N9Z6xCe66S44kC19r3y0TLeOWjrHccaPLVt8qONnFyntavAorAu1OU=","X-Received":"by 10.28.183.85 with SMTP id h82mr3596956wmf.24.1506433507957;\n\tTue, 26 Sep 2017 06:45:07 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170925123435.GI15629@ovn.org>","References":"<20170919220125.32535-1-blp@ovn.org>\n\t<20170919220125.32535-40-blp@ovn.org>\n\t<CAC3B9fn6SVBiNV79OHJ3Xdcp1XnC=O2TvZogf=CZNi5pF0coBQ@mail.gmail.com>\n\t<20170922194832.GD15629@ovn.org>\n\t<CAC3B9fkNR2XsXWYZSOUs6FTxkvU+mLgjNaB7PG33-f2VcREj3g@mail.gmail.com>\n\t<20170925123435.GI15629@ovn.org>","From":"Miguel Angel Ajo Pelayo <majopela@redhat.com>","Date":"Tue, 26 Sep 2017 15:45:07 +0200","Message-ID":"<CAC3B9fnakN25DttN2yVzaF7EOvMZCTQfr6tMjnG6P5_mBps+JQ@mail.gmail.com>","To":"Ben Pfaff <blp@ovn.org>","X-Spam-Status":"No, score=0.5 required=5.0 tests=HTML_MESSAGE,\n\tRCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","X-Content-Filtered-By":"Mailman/MimeDel 2.1.12","Cc":"ovs dev <dev@openvswitch.org>","Subject":"Re: [ovs-dev] [PATCH RFC 39/52] ovn-sbctl: Allow retries by default.","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}}]