From issues-return-48087-archive-asf-public=cust-asf.ponee.io@mesos.apache.org Tue Jul 3 16:02:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 97A1A180674 for ; Tue, 3 Jul 2018 16:02:03 +0200 (CEST) Received: (qmail 76059 invoked by uid 500); 3 Jul 2018 14:02:02 -0000 Mailing-List: contact issues-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list issues@mesos.apache.org Received: (qmail 76050 invoked by uid 99); 3 Jul 2018 14:02:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2018 14:02:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 29A3CC0090 for ; Tue, 3 Jul 2018 14:02:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id FC7E3lwF0rax for ; Tue, 3 Jul 2018 14:02:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id DF0E25F432 for ; Tue, 3 Jul 2018 14:02:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 59A87E0361 for ; Tue, 3 Jul 2018 14:02:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 20F48274F1 for ; Tue, 3 Jul 2018 14:02:00 +0000 (UTC) Date: Tue, 3 Jul 2018 14:02:00 +0000 (UTC) From: "Kirill Plyashkevich (JIRA)" To: issues@mesos.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MESOS-9031) Mesos CNI portmap plugins' iptables rules doesn't allow connections via host ip and port from the same bridge container network MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MESOS-9031?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1653= 1457#comment-16531457 ]=20 Kirill Plyashkevich commented on MESOS-9031: -------------------------------------------- [~qianzhang], do=C2=A0you have {quote}"excludeDevices" : []{quote} set in the config? if `excludeDevices` contains bridge (`mesos-cni0`), you get connection refu= sed. > Mesos CNI portmap plugins' iptables rules doesn't allow connections via h= ost ip and port from the same bridge container network > -------------------------------------------------------------------------= ------------------------------------------------------ > > Key: MESOS-9031 > URL: https://issues.apache.org/jira/browse/MESOS-9031 > Project: Mesos > Issue Type: Bug > Components: cni, containerization > Affects Versions: 1.6.0 > Reporter: Kirill Plyashkevich > Assignee: Qian Zhang > Priority: Major > > using `mesos-cni-port-mapper` with folllowing config: > {noformat} > {=20 > =C2=A0=C2=A0=C2=A0"name" : "dcos",=20 > =C2=A0=C2=A0=C2=A0"type" : "mesos-cni-port-mapper",=20 > =C2=A0=C2=A0=C2=A0"excludeDevices" : [],=20 > =C2=A0=C2=A0=C2=A0"chain": "MESOS-CNI0-PORT-MAPPER",=20 > =C2=A0=C2=A0=C2=A0"delegate": {=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"type": "bridge",=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"bridge": "mesos-cni0",=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"isGateway": true,=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"ipMasq": true,=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"hairpinMode": true,=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"ipam": {=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"type":= "host-local",=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"ranges= ": [=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0[{"subnet": "172.26.0.0/16"}]=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0],=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"routes= ": [=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0{"dst": "0.0.0.0/0"}=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0]=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}=20 > =C2=A0=C2=A0=C2=A0}=20 > } > {noformat} > - 2 services running on the same mesos-slave using unified containerizer= in different tasks and communicating via host ip and host port > - connection timeouts due to iptables rules per container CNI-XXX chain > - actually timeouts are caused by > {noformat} > Chain CNI-XXX (1 references) > num target prot opt source destination =20 > 1 ACCEPT all -- anywhere 172.26.0.0/16 /* nam= e: "dcos" id: "YYYY" */ > 2 MASQUERADE all -- anywhere !base-address.mcast.net/4 = /* name: "dcos" id: "YYYY" */ > {noformat} > rule #1 is executed and no masquerading happens. > there are multiple solutions: > - -simpliest and fastest one is not to add that ACCEPT-=C2=A0- NOT A SOL= UTION. it's happening in `bridge` plugin and `cni/portmap` shows that snat/= masquerade should be done during portmapping as well. > - perhaps, there's a better change in iptables rules that can fix it > - proper one (imho) is to finally implement cni spec 0.3.x in order to b= e able to use chaining of plugins and use cni's `bridge` and `portmap` plug= ins in chain (and get rid of mesos-cni-port-mapper completely eventually). -- This message was sent by Atlassian JIRA (v7.6.3#76005)