Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 26718183B2 for ; Fri, 20 Nov 2015 14:50:44 +0000 (UTC) Received: (qmail 7004 invoked by uid 500); 20 Nov 2015 14:50:40 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 6850 invoked by uid 500); 20 Nov 2015 14:50:39 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 6839 invoked by uid 99); 20 Nov 2015 14:50:38 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2015 14:50:38 +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 45EF1C62A6 for ; Fri, 20 Nov 2015 14:50:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.129 X-Spam-Level: *** X-Spam-Status: No, score=3.129 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Q8UoJeDU4rxe for ; Fri, 20 Nov 2015 14:50:37 +0000 (UTC) Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 36CAF205C2 for ; Fri, 20 Nov 2015 14:50:37 +0000 (UTC) Received: by wmww144 with SMTP id w144so24073227wmw.0 for ; Fri, 20 Nov 2015 06:50:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=guTdf7ZP7eA6G1ZrWHiaRiRjVNr1jKFk8Ivi2Cg2qYc=; b=Hb90D7jkbRoS2JgKXmlzOjeXhL/ze22atuTe4XBTSmPy/Kpwspibs5CVGRYbmlrXwT qMlcKt+IH7M1j42F0W+OVvgzh0aRsFdZSiYdgD0D59b1WD/Xj6h+5TfxASJ9Rt12szdx k1tAXFtnHqzi+3QhVVvL7RvsMVzLdCsckTQ3UZGUCSBoItKWiqyD405sI0rabif6iRSS maFmbRGc3zQmcCzMfG5uOqkJ6piCCpSnamAv73u+bVO/5MAVgwrtaXCuY9qUzAQHfjCI C5m2+oEHKiGp1uY8z0FcCcoi5mby+rQpM/1IDgsdlIOWFGr8pAj6z8NlxSS2h2SrWuAs uWtA== MIME-Version: 1.0 X-Received: by 10.28.139.143 with SMTP id n137mr2834775wmd.8.1448031035903; Fri, 20 Nov 2015 06:50:35 -0800 (PST) Received: by 10.27.210.75 with HTTP; Fri, 20 Nov 2015 06:50:35 -0800 (PST) Date: Fri, 20 Nov 2015 15:50:35 +0100 Message-ID: Subject: Yarn: how to specify the hostname/IP for communication between the ResourceManager and the NodeManager for a Kubernetes deployment. From: geoffroy chollon To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=001a11444efa84d5710524f9ff02 --001a11444efa84d5710524f9ff02 Content-Type: text/plain; charset=UTF-8 Hello, Tl;dr question: How to make the NodeManager give the "yarn.nodemanager.hostname" value to the Yarn ResourceManager during registration for IPC communication. Explanations: I have trouble making a Yarn cluster works in a Kubernetes deployment where every components run as a Docker container. When the NodeManager registers with the Yarn ResourceManager, it give its hostname for NodeId. Then the ResourceManager uses this NodeId to communicate with the node. The problem is that the hostname comes from system calls and not from the Yarn's configuration files. The ResourceManager is unable to talk to the NodeManager because the container hostname is invalid in the DNS context. Moreover, Docker disallows a dynamic change of a container's hostname. My Yarn NodeManager's configuration looks like this: * * yarn.resourcemanager.hostname * yarnrm-int-svc.default.svc.cluster.docker * * * * yarn.nodemanager.hostname * 100-66-10-4.default.pod.cluster.docker * * * yarn.nodemanager.address * 100-66-10-4.default.pod.cluster.docker:8111 * * * yarn.nodemanager.webapp.address * 100-66-10-4.default.pod.cluster.docker:8042 * * * yarn.nodemanager.localizer.address * 100-66-10-4.default.pod.cluster.docker:8040 * I tried to simply use IP but it didn't work either. For now I had to fork the Kubernetes's DNS plugin to please Yarn but its not a proper solution. It's difficult to understand why the NodeId not configurable in this setup. If so, why do the "yarn.nodemanager.hostname" variable exists in the first place ?. Anyway, if someone knows a solution to this problem it would be very helpful. Thanks Geoffroy --001a11444efa84d5710524f9ff02 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,


Tl= ;dr question: How to make the NodeManager give the "yarn.nodemanager.h= ostname" value to the Yarn ResourceManager during registration for IPC= communication.


Explanations:
=

I have trouble making a Yarn cluster works in a Kuberne= tes deployment where every components run as a Docker container.
=
When the NodeManager registers with the Yarn ResourceManager= , it give its hostname for NodeId. Then the ResourceManager uses this NodeI= d to communicate with the node.

The problem is tha= t the hostname comes from system calls and not from the Yarn's configur= ation files. The ResourceManager is unable to talk to the NodeManager becau= se the container hostname is invalid in the DNS context. Moreover, Docker d= isallows a dynamic change of a container's hostname.=C2=A0
My Yarn NodeManager's configuration looks like this:
=

* =C2=A0 =C2=A0 =C2=A0<property>
* =C2= =A0 =C2=A0 =C2=A0 =C2=A0<name>yarn.resourcemanager.hostname</name&= gt;
* =C2=A0 =C2=A0 =C2=A0 =C2=A0<value>yarnrm-int-svc.defa= ult.svc.cluster.docker</value>
* =C2=A0 =C2=A0 =C2=A0</p= roperty>
*
* =C2=A0 =C2=A0 =C2=A0<property>
* =C2=A0 =C2=A0 =C2=A0 =C2=A0<name>yarn.nodemanager.hostname&= lt;/name>
* =C2=A0 =C2=A0 =C2=A0 =C2=A0<value>100-66-10-= 4.default.pod.cluster.docker</value>
* =C2=A0 =C2=A0 =C2=A0= </property>
* =C2=A0 =C2=A0 =C2=A0<property>
* =C2=A0 =C2=A0 =C2=A0 =C2=A0<name>yarn.nodemanager.address</nam= e>
* =C2=A0 =C2=A0 =C2=A0 =C2=A0<value>100-66-10-4.defau= lt.pod.cluster.docker:8111</value>
* =C2=A0 =C2=A0 =C2=A0&l= t;/property>
* =C2=A0 =C2=A0 =C2=A0<property>
= * =C2=A0 =C2=A0 =C2=A0 =C2=A0<name>yarn.nodemanager.webapp.address<= ;/name>
* =C2=A0 =C2=A0 =C2=A0 =C2=A0<value>100-66-10-4.= default.pod.cluster.docker:8042</value>
* =C2=A0 =C2=A0 =C2= =A0</property>
* =C2=A0 =C2=A0 =C2=A0<property>
=
* =C2=A0 =C2=A0 =C2=A0 =C2=A0<name>yarn.nodemanager.localizer.ad= dress</name>
* =C2=A0 =C2=A0 =C2=A0 =C2=A0<value>100-= 66-10-4.default.pod.cluster.docker:8040</value>
* =C2=A0 = =C2=A0 =C2=A0</property>

I tried to simply u= se IP but it didn't work either. For now I had to fork the Kubernetes&#= 39;s DNS plugin to please Yarn but its not a proper solution.
It's difficult to understand why the NodeId not configurabl= e in this setup. If so, why do the "yarn.nodemanager.hostname" va= riable exists in the first place ?.
Anyway, if someone knows a so= lution to this problem it would be very helpful.

<= br>
Thanks
Geoffroy
--001a11444efa84d5710524f9ff02--