[{"id":1798131,"web_url":"http://patchwork.ozlabs.org/comment/1798131/","msgid":"<20171102174535.GY27530@ovn.org>","list_archive_url":null,"date":"2017-11-02T17:45:35","subject":"Re: [ovs-dev] [PATCH] ovn-ctl: Provide the option to detach the OVN\n\tdb servers or not when starting","submitter":{"id":67603,"url":"http://patchwork.ozlabs.org/api/people/67603/","name":"Ben Pfaff","email":"blp@ovn.org"},"content":"On Thu, Nov 02, 2017 at 04:55:14PM +0530, nusiddiq@redhat.com wrote:\n> From: Numan Siddique <nusiddiq@redhat.com>\n> \n> Presently if the user wants to start OVN db servers as separate containers, 'ovn-ctl'\n> script is not useful as '--detach' option is passed when ovsdb-servers are started.\n> If the container command is 'ovn-ctl start_nb_ovsdb', the  container exits as soon as\n> ovn-ctl exits.\n> \n> This patch adds 2 new options to the 'ovn-ctl' script - '--db-nb-detach' and\n> '--db-sb-detach' which can take 'yes/no'. This will be really useful for the above\n> mentioned requirement. The user can start NB ovsdb-server with the command\n> 'ovn-ctl start_nb_ovsdb --db-nb-detach=no'.\n> \n> Without this option, the user may have to first generate the db by running 'ovsdb-tool'\n> and then start the container with the command 'ovsdb-server ovnnb_db.db ....' and this\n> is very inconvenient. This option will be useful only if the OVN db servers are started\n> in separate containers.\n> \n> This patch also updates the missing documentation in ovn-ctl.8.xml.\n> \n> Signed-off-by: Numan Siddique <nusiddiq@redhat.com>\n\nDespite the small patch, this is a major change in actual functionality,\nsince, with this option, ovn-ctl changes from a fast-running script that\njust starts or stops a daemon, to a long-running script that waits for\nthe daemon to exit.\n\nI wonder whether this would warrant new commands, e.g. run_nb_ovsdb and\nrun_sb_ovsdb.  These could be implemented internally by just adding the\noption, I guess.\n\nAnother way might be to add a command to wait for a service to exit.\n\nThe \"ovn-[sn]bctl init\" commands won't run, in this case.  Maybe that is\nnot too important.\n\n--detach and --monitor are independent.  Is there a reason to remove\n--monitor when removing --detach?","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 3ySXYj07mWz9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  3 Nov 2017 04:45:44 +1100 (AEDT)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 6048BC8A;\n\tThu,  2 Nov 2017 17:45:43 +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 40772C83\n\tfor <dev@openvswitch.org>; Thu,  2 Nov 2017 17:45:42 +0000 (UTC)","from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id D8653248\n\tfor <dev@openvswitch.org>; Thu,  2 Nov 2017 17:45:41 +0000 (UTC)","from ovn.org (unknown [208.91.3.26])\n\t(Authenticated sender: blp@ovn.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 4BC6741C07F;\n\tThu,  2 Nov 2017 18:45:38 +0100 (CET)"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-Originating-IP":"208.91.3.26","Date":"Thu, 2 Nov 2017 10:45:35 -0700","From":"Ben Pfaff <blp@ovn.org>","To":"nusiddiq@redhat.com","Message-ID":"<20171102174535.GY27530@ovn.org>","References":"<20171102112514.27542-1-nusiddiq@redhat.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20171102112514.27542-1-nusiddiq@redhat.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":"dev@openvswitch.org","Subject":"Re: [ovs-dev] [PATCH] ovn-ctl: Provide the option to detach the OVN\n\tdb servers or not when starting","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":1798157,"web_url":"http://patchwork.ozlabs.org/comment/1798157/","msgid":"<CAH=CPzqffRCgGBHpDC+vGhyUnezWQ2mNNcs2gYs7XW9bsYhLAA@mail.gmail.com>","list_archive_url":null,"date":"2017-11-02T18:11:17","subject":"Re: [ovs-dev] [PATCH] ovn-ctl: Provide the option to detach the OVN\n\tdb servers or not when starting","submitter":{"id":67480,"url":"http://patchwork.ozlabs.org/api/people/67480/","name":"Numan Siddique","email":"nusiddiq@redhat.com"},"content":"On Thu, Nov 2, 2017 at 11:15 PM, Ben Pfaff <blp@ovn.org> wrote:\n\n> On Thu, Nov 02, 2017 at 04:55:14PM +0530, nusiddiq@redhat.com wrote:\n> > From: Numan Siddique <nusiddiq@redhat.com>\n> >\n> > Presently if the user wants to start OVN db servers as separate\n> containers, 'ovn-ctl'\n> > script is not useful as '--detach' option is passed when ovsdb-servers\n> are started.\n> > If the container command is 'ovn-ctl start_nb_ovsdb', the  container\n> exits as soon as\n> > ovn-ctl exits.\n> >\n> > This patch adds 2 new options to the 'ovn-ctl' script - '--db-nb-detach'\n> and\n> > '--db-sb-detach' which can take 'yes/no'. This will be really useful for\n> the above\n> > mentioned requirement. The user can start NB ovsdb-server with the\n> command\n> > 'ovn-ctl start_nb_ovsdb --db-nb-detach=no'.\n> >\n> > Without this option, the user may have to first generate the db by\n> running 'ovsdb-tool'\n> > and then start the container with the command 'ovsdb-server ovnnb_db.db\n> ....' and this\n> > is very inconvenient. This option will be useful only if the OVN db\n> servers are started\n> > in separate containers.\n> >\n> > This patch also updates the missing documentation in ovn-ctl.8.xml.\n> >\n> > Signed-off-by: Numan Siddique <nusiddiq@redhat.com>\n>\n> Despite the small patch, this is a major change in actual functionality,\n> since, with this option, ovn-ctl changes from a fast-running script that\n> just starts or stops a daemon, to a long-running script that waits for\n> the daemon to exit.\n>\n> I wonder whether this would warrant new commands, e.g. run_nb_ovsdb and\n> run_sb_ovsdb.  These could be implemented internally by just adding the\n> option, I guess.\n>\n> Another way might be to add a command to wait for a service to exit.\n>\n> The \"ovn-[sn]bctl init\" commands won't run, in this case.  Maybe that is\n> not too important.\n>\n> --detach and --monitor are independent.  Is there a reason to remove\n> --monitor when removing --detach?\n>\n\nThanks Ben. I agree. I will work based on your suggestions.\nIn the case of containers, I thnk monitor is not required. The life of the\ncontainer in the case of ovsdb-server would be till it runs.\nIn case the ovsdb-server exits unexpectedly, the container\nmanagement service (like docker) can restart the container if \"restart\"\nflag is set when starting the container.\nPlease let me know if this doesn't sound fine.\n\nThanks\nNuman","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 3ySY7J1LcRz9sP1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  3 Nov 2017 05:11:23 +1100 (AEDT)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id A8677C7A;\n\tThu,  2 Nov 2017 18:11:21 +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 AD33BC06\n\tfor <dev@openvswitch.org>; Thu,  2 Nov 2017 18:11:19 +0000 (UTC)","from mail-oi0-f53.google.com (mail-oi0-f53.google.com\n\t[209.85.218.53])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 1E61C196\n\tfor <dev@openvswitch.org>; Thu,  2 Nov 2017 18:11:19 +0000 (UTC)","by mail-oi0-f53.google.com with SMTP id h6so340459oia.10\n\tfor <dev@openvswitch.org>; Thu, 02 Nov 2017 11:11:19 -0700 (PDT)","by 10.157.42.200 with HTTP; Thu, 2 Nov 2017 11:11:17 -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=r2P9/+BGc+wNwz6e8U4Mh3tHjf+Y8bkBGk7+K6sHAu4=;\n\tb=Ypux/h5iw/52Yl7oljFK2XUEctPdskdi3VJKKpHWEbqHVDzRa9U7tX4OlTFH7wLTvj\n\tCQ7DK67BdjwH8O+pMNiB4IHEe0Xgc5lkS+xVse0zzCp9tyFCgb7uvvoVjSUKQ89KzbE2\n\tCpFCsvLmrNomSHBYOqP9YfOJu21vPLPzVMy4PmsALkxt5VXQ8CVXAE0dM4rmjSuPIN+1\n\tnH/edofFGrm/AA0irEfvd7VKJ8/qVl0S3uyazHfdx8PlenigXKffOLl0VWsuJ4U83Ssw\n\t7U9iT5QAFSWedyIm82LmYF/TYLYB/NCtnL77dNBCp4uUZqgJLHRcFrhy7/3BzU+WInS8\n\tSglg==","X-Gm-Message-State":"AMCzsaWY2ZoSlEihm90I4TaHthgDBmZogDeJiEm6brkAChFXS5frDzng\n\tiZarIDXozLlhf+kPg+YVCuP8eyh/B6hFdDQ05slkJg==","X-Google-Smtp-Source":"ABhQp+T+y9pvYQ+qPKZkJ6g3sED+6cCVB/iCnqxkmrciHut8v/pcgqHBkhGfSH7Vlvr/iifu1KmGGdzzFtShb40JJeg=","X-Received":"by 10.202.5.68 with SMTP id 65mr2632668oif.276.1509646278302;\n\tThu, 02 Nov 2017 11:11:18 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20171102174535.GY27530@ovn.org>","References":"<20171102112514.27542-1-nusiddiq@redhat.com>\n\t<20171102174535.GY27530@ovn.org>","From":"Numan Siddique <nusiddiq@redhat.com>","Date":"Thu, 2 Nov 2017 23:41:17 +0530","Message-ID":"<CAH=CPzqffRCgGBHpDC+vGhyUnezWQ2mNNcs2gYs7XW9bsYhLAA@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] ovn-ctl: Provide the option to detach the OVN\n\tdb servers or not when starting","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":1798166,"web_url":"http://patchwork.ozlabs.org/comment/1798166/","msgid":"<20171102181836.GF27530@ovn.org>","list_archive_url":null,"date":"2017-11-02T18:18:36","subject":"Re: [ovs-dev] [PATCH] ovn-ctl: Provide the option to detach the OVN\n\tdb servers or not when starting","submitter":{"id":67603,"url":"http://patchwork.ozlabs.org/api/people/67603/","name":"Ben Pfaff","email":"blp@ovn.org"},"content":"On Thu, Nov 02, 2017 at 11:41:17PM +0530, Numan Siddique wrote:\n> On Thu, Nov 2, 2017 at 11:15 PM, Ben Pfaff <blp@ovn.org> wrote:\n> \n> > On Thu, Nov 02, 2017 at 04:55:14PM +0530, nusiddiq@redhat.com wrote:\n> > > From: Numan Siddique <nusiddiq@redhat.com>\n> > >\n> > > Presently if the user wants to start OVN db servers as separate\n> > containers, 'ovn-ctl'\n> > > script is not useful as '--detach' option is passed when ovsdb-servers\n> > are started.\n> > > If the container command is 'ovn-ctl start_nb_ovsdb', the  container\n> > exits as soon as\n> > > ovn-ctl exits.\n> > >\n> > > This patch adds 2 new options to the 'ovn-ctl' script - '--db-nb-detach'\n> > and\n> > > '--db-sb-detach' which can take 'yes/no'. This will be really useful for\n> > the above\n> > > mentioned requirement. The user can start NB ovsdb-server with the\n> > command\n> > > 'ovn-ctl start_nb_ovsdb --db-nb-detach=no'.\n> > >\n> > > Without this option, the user may have to first generate the db by\n> > running 'ovsdb-tool'\n> > > and then start the container with the command 'ovsdb-server ovnnb_db.db\n> > ....' and this\n> > > is very inconvenient. This option will be useful only if the OVN db\n> > servers are started\n> > > in separate containers.\n> > >\n> > > This patch also updates the missing documentation in ovn-ctl.8.xml.\n> > >\n> > > Signed-off-by: Numan Siddique <nusiddiq@redhat.com>\n> >\n> > Despite the small patch, this is a major change in actual functionality,\n> > since, with this option, ovn-ctl changes from a fast-running script that\n> > just starts or stops a daemon, to a long-running script that waits for\n> > the daemon to exit.\n> >\n> > I wonder whether this would warrant new commands, e.g. run_nb_ovsdb and\n> > run_sb_ovsdb.  These could be implemented internally by just adding the\n> > option, I guess.\n> >\n> > Another way might be to add a command to wait for a service to exit.\n> >\n> > The \"ovn-[sn]bctl init\" commands won't run, in this case.  Maybe that is\n> > not too important.\n> >\n> > --detach and --monitor are independent.  Is there a reason to remove\n> > --monitor when removing --detach?\n> >\n> \n> Thanks Ben. I agree. I will work based on your suggestions.\n> In the case of containers, I thnk monitor is not required. The life of the\n> container in the case of ovsdb-server would be till it runs.\n> In case the ovsdb-server exits unexpectedly, the container\n> management service (like docker) can restart the container if \"restart\"\n> flag is set when starting the container.\n> Please let me know if this doesn't sound fine.\n\nI think that's OK, then.\n\nIt would be good to explain what this does, and why, and when might want\nto use it, in the ovn-ctl manpage.\n\nThanks,\n\nBen.","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 3ySYHr4Nffz9sNd\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  3 Nov 2017 05:18:47 +1100 (AEDT)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id BA5F4CBA;\n\tThu,  2 Nov 2017 18:18:44 +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 AEBF8C83\n\tfor <dev@openvswitch.org>; Thu,  2 Nov 2017 18:18:43 +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 2F64F20D\n\tfor <dev@openvswitch.org>; Thu,  2 Nov 2017 18:18:43 +0000 (UTC)","from ovn.org (unknown [208.91.3.26])\n\t(Authenticated sender: blp@ovn.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 64C001720C2;\n\tThu,  2 Nov 2017 19:18:40 +0100 (CET)"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-Originating-IP":"208.91.3.26","Date":"Thu, 2 Nov 2017 11:18:36 -0700","From":"Ben Pfaff <blp@ovn.org>","To":"Numan Siddique <nusiddiq@redhat.com>","Message-ID":"<20171102181836.GF27530@ovn.org>","References":"<20171102112514.27542-1-nusiddiq@redhat.com>\n\t<20171102174535.GY27530@ovn.org>\n\t<CAH=CPzqffRCgGBHpDC+vGhyUnezWQ2mNNcs2gYs7XW9bsYhLAA@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAH=CPzqffRCgGBHpDC+vGhyUnezWQ2mNNcs2gYs7XW9bsYhLAA@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] ovn-ctl: Provide the option to detach the OVN\n\tdb servers or not when starting","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"}}]