From reviews-return-92175-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Mon Aug 10 03:06:41 2020 Return-Path: X-Original-To: apmail-mesos-reviews-archive@locus.apache.org Delivered-To: apmail-mesos-reviews-archive@locus.apache.org Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with ESMTP id 6146C1A941 for ; Mon, 10 Aug 2020 03:06:41 +0000 (UTC) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id 146D41245E9 for ; Mon, 10 Aug 2020 03:06:41 +0000 (UTC) Received: (qmail 52849 invoked by uid 500); 10 Aug 2020 03:06:40 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 52680 invoked by uid 500); 10 Aug 2020 03:06:38 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 52641 invoked by uid 99); 10 Aug 2020 03:06:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Aug 2020 03:06:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 1E016C0371 for ; Mon, 10 Aug 2020 03:06:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.565 X-Spam-Level: **** X-Spam-Status: No, score=4.565 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_REPLYTO_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.2, KAM_DMARC_NONE=0.25, KAM_DMARC_STATUS=0.01, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, KHOP_HELO_FCRDNS=0.4, NML_ADSP_CUSTOM_MED=1.2, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id llNk5Eq4_uQ1 for ; Mon, 10 Aug 2020 03:06:32 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=95.217.165.199; helo=reviews-vm-he-fi.apache.org; envelope-from=noreply@reviews.apache.org; receiver= Received: from reviews-vm-he-fi.apache.org (static.199.165.217.95.clients.your-server.de [95.217.165.199]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTP id 573CFBE363 for ; Mon, 10 Aug 2020 03:06:32 +0000 (UTC) Received: from reviews-vm-he-fi.apache.org (reviews-vm-he-fi.apache.org [127.0.0.1]) by reviews-vm-he-fi.apache.org (Postfix) with ESMTP id 9A79816018D; Mon, 10 Aug 2020 03:06:30 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============9036250931734212511==" MIME-Version: 1.0 Subject: Re: Review Request 72716: Added implementation of the CSI server. From: Qian Zhang To: Qian Zhang , Andrei Budnik Cc: Mesos Reviewbot , Greg Mann , mesos Date: Mon, 10 Aug 2020 03:06:30 -0000 Message-ID: <20200810030630.6277.54412@reviews-vm-he-fi.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Qian Zhang X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/72716/ X-Sender: Qian Zhang References: <20200807120145.14033.47086@reviews-vm-he-fi.apache.org> In-Reply-To: <20200807120145.14033.47086@reviews-vm-he-fi.apache.org> X-ReviewBoard-Diff-For: src/slave/csi_server.cpp Reply-To: Qian Zhang X-ReviewRequest-Repository: mesos --===============9036250931734212511== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Aug. 7, 2020, 8:01 p.m., Qian Zhang wrote: > > src/slave/csi_server.cpp > > Lines 200 (patched) > > > > > > Do we need to include `info.type()` in the container prefix? Otherwise the container prefix for all the managed CSI plugins will be same which may not be good for debugging. > > Greg Mann wrote: > The plugin name and type already get added into the container ID after the prefix, so I think the current code is sufficient: https://github.com/apache/mesos/blob/c78dc333fc893a43d40dc33299a61987198a6ea9/src/csi/service_manager.cpp#L117-L121 > > WDYT? Yeah, you are right! > On Aug. 7, 2020, 8:01 p.m., Qian Zhang wrote: > > src/slave/csi_server.cpp > > Lines 336 (patched) > > > > > > Do we need to check if `volume/csi` isolator is enabled? Like: > > ``` > > if (!strings::contains(flags.isolation, "volume/csi")) { > > return Error("..."); > > } > > ``` > > > > I think to make the whole CSI volume feature work, both `CSIServer` and `volume/csi` isolator need to be enabled. > > > > And in which condition will we call `CSIServer::create` to create `CSISever`? When `--csi_plugin_config_dir` is specified? If so, I think here we need a `CHECK` rather than an `if`. > > Greg Mann wrote: > I agree that we should check for the CSI isolator. However, I don't think we should use a CHECK within this `create()` method. The `Try` return type provides the perfect mechanism for surfacing any failures, which we can handle in the agent. Yeah, I agree. So could you please add the check for the CSI isolator here? And I guess we will call `CSIServer::create` to create CSI sever **only** when `--csi_plugin_config_dir` is specified, right? > On Aug. 7, 2020, 8:01 p.m., Qian Zhang wrote: > > src/slave/csi_server.cpp > > Lines 413-415 (patched) > > > > > > Do we need to define `started` as a promise here? Can we just define it as a future? > > ``` > > started = process::dispatch(process.get(), &CSIServerProcess::start); > > return started; > > ``` > > Greg Mann wrote: > Yep, we can't use a simple Future because we don't initiate startup during server construction, as is the case in the volume manager. `started.associate()` allows us to initiate startup using the existing Future within the Promise. If we use a raw Future, then the only way to initiate startup is to overwrite the stored Future, onto which some publish/unpublish calls may have already been chained. I see, thank you! - Qian ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72716/#review221499 ----------------------------------------------------------- On Aug. 7, 2020, 3 p.m., Greg Mann wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72716/ > ----------------------------------------------------------- > > (Updated Aug. 7, 2020, 3 p.m.) > > > Review request for mesos, Andrei Budnik and Qian Zhang. > > > Bugs: MESOS-10163 > https://issues.apache.org/jira/browse/MESOS-10163 > > > Repository: mesos > > > Description > ------- > > Added implementation of the CSI server. > > > Diffs > ----- > > src/CMakeLists.txt 4e15e3d99aa2cce2403fe07e762fef2fb4a27dea > src/Makefile.am 447db323875e4cad46000977f4a61600baff8f89 > src/slave/csi_server.hpp 17882e1be5a6c38ca34d7b50d4a6041530e8908c > src/slave/csi_server.cpp PRE-CREATION > > > Diff: https://reviews.apache.org/r/72716/diff/5/ > > > Testing > ------- > > Details at the end of this chain. > > > Thanks, > > Greg Mann > > --===============9036250931734212511==--