Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A87EE200BE2 for ; Thu, 15 Dec 2016 23:05:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A7159160B15; Thu, 15 Dec 2016 22:05:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EC20A160B13 for ; Thu, 15 Dec 2016 23:05:04 +0100 (CET) Received: (qmail 20033 invoked by uid 500); 15 Dec 2016 22:05:04 -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 20007 invoked by uid 99); 15 Dec 2016 22:05:03 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2016 22:05:03 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 7B6CF2FD733; Thu, 15 Dec 2016 22:05:02 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0109947846916985005==" MIME-Version: 1.0 Subject: Re: Review Request 54716: Modified the initialization logic for `network/cni` isolator. From: Jie Yu To: Jie Yu , Qian Zhang Cc: Avinash sridharan , mesos Date: Thu, 15 Dec 2016 22:05:02 -0000 Message-ID: <20161215220502.17252.65624@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Jie Yu X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/54716/ X-Sender: Jie Yu References: <20161213235159.17252.14521@reviews.apache.org> In-Reply-To: <20161213235159.17252.14521@reviews.apache.org> Reply-To: Jie Yu X-ReviewRequest-Repository: mesos archived-at: Thu, 15 Dec 2016 22:05:05 -0000 --===============0109947846916985005== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54716/#review159374 ----------------------------------------------------------- src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (lines 126 - 129) I would probably use the following interface: ``` static Try> loadNetworkConfigs( const string& configDir, const string& pluginDir); ``` It seems weird to me to only cache 'type' of the config. I'd change the existing `networkConfigs` to be a hashmap of name to path. And we always validate the name in the config in `prepare`. - Jie Yu On Dec. 13, 2016, 11:51 p.m., Avinash sridharan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/54716/ > ----------------------------------------------------------- > > (Updated Dec. 13, 2016, 11:51 p.m.) > > > Review request for mesos, Jie Yu and Qian Zhang. > > > Bugs: MESOS-6567 > https://issues.apache.org/jira/browse/MESOS-6567 > > > Repository: mesos > > > Description > ------- > > Since the `network/cni` isolator will soon be able to > add/modify/delete CNI configuration files without the need for agent > restart, we are changing the initialization logic to not bail out if > we see errors while reading a CNI configuration file or don't find a > CNI plugin for a given CNI configuration. If either of these errors > occur the `network/cni` isolator would simply skip the specific CNI > network and complete the initialization. > > > Diffs > ----- > > src/slave/containerizer/mesos/isolators/network/cni/cni.hpp b8fc755a8dd4757d904f7e97a71d3cf7f29d2033 > src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ddb4d33e9ecd0ffd118e8e68cb7ec90346b08049 > > Diff: https://reviews.apache.org/r/54716/diff/ > > > Testing > ------- > > sudo make check --gtest_filter=*CNI* > > > Thanks, > > Avinash sridharan > > --===============0109947846916985005==--