From yarn-issues-return-140582-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Mon Mar 26 20:17: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 A3A96180649 for ; Mon, 26 Mar 2018 20:17:03 +0200 (CEST) Received: (qmail 52924 invoked by uid 500); 26 Mar 2018 18:17:02 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 52909 invoked by uid 99); 26 Mar 2018 18:17:02 -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, 26 Mar 2018 18:17:02 +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 0FEB2C1C4E for ; Mon, 26 Mar 2018 18:17:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 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, T_RP_MATCHES_RCVD=-0.01, 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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id GE4Ut2zWRqCJ for ; Mon, 26 Mar 2018 18:17: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 1ECAB5F3E3 for ; Mon, 26 Mar 2018 18:17:01 +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 986A4E023A for ; Mon, 26 Mar 2018 18:17: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 5D704214FF for ; Mon, 26 Mar 2018 18:17:00 +0000 (UTC) Date: Mon, 26 Mar 2018 18:17:00 +0000 (UTC) From: "Suma Shivaprasad (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-7935) Expose container's hostname to applications running within the docker container 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/YARN-7935?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16414= 269#comment-16414269 ]=20 Suma Shivaprasad commented on YARN-7935: ---------------------------------------- Spark drivers/AM/executor on docker do not go through Registry DNS and uses= docker embedded DNS(in user defined networks) for resolution in the curren= t implementation since=C2=A0spark=C2=A0has a custom AM and is not a Yarn se= rvice.=C2=A0 Had explored using HOSTNAME/`hostname` for setting the container's hostname= but decided to use a per-configured value instead due to possible injectio= n attacks with /etc/hosts - [https://bugs.launchpad.net/ubuntu/+source/bash= /+bug/1507025|https://www.google.com/url?q=3Dhttps://bugs.launchpad.net/ubu= ntu/%2Bsource/bash/%2Bbug/1507025&sa=3DD&ust=3D1519936820096000&usg=3DAFQjC= NHA75LBYmOwM5b5vTwReS26dWL5Mg] [http://openwall.com/lists/oss-security/2016/09/16/8|https://www.google.com= /url?q=3Dhttp://openwall.com/lists/oss-security/2016/09/16/8&sa=3DD&ust=3D1= 519936820096000&usg=3DAFQjCNERevi66M5YayA0ZFC0mw6JZT5RAQ] which could be problematic in 'host' network mode. The security vulnerabili= ty seems to be fixed only in bash versions > 4.4 and may be different in ot= her linux distributions. Also, the impact of setting hostname through --host in "host" mode seems to= differ in behaviour across docker versions , OS(on MAC,=C2=A0 --host's set= value in 'host' networking mode is returned by `hostname` or $HOSTNAME whi= ch is not routable and=C2=A0this differs from linux) and hence --hostname's= value seems inherently unstable to depend on. > Expose container's hostname to applications running within the docker con= tainer > -------------------------------------------------------------------------= ------ > > Key: YARN-7935 > URL: https://issues.apache.org/jira/browse/YARN-7935 > Project: Hadoop YARN > Issue Type: Sub-task > Components: yarn > Reporter: Suma Shivaprasad > Assignee: Suma Shivaprasad > Priority: Major > Attachments: YARN-7935.1.patch, YARN-7935.2.patch, YARN-7935.3.pa= tch > > > Some applications have a need to bind to the container's hostname (like S= park) which is different from the NodeManager's hostname(NM_HOST which is a= vailable as an env during container launch) when launched through Docker ru= ntime.=C2=A0The container's hostname can be exposed to applications via an = env CONTAINER_HOSTNAME. Another potential candidate is the container's IP b= ut this can be addressed in a separate jira. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org