From common-issues-return-154501-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Fri Jul 6 05:46:05 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 D031F180674 for ; Fri, 6 Jul 2018 05:46:04 +0200 (CEST) Received: (qmail 50120 invoked by uid 500); 6 Jul 2018 03:46:03 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 50108 invoked by uid 99); 6 Jul 2018 03:46:03 -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; Fri, 06 Jul 2018 03:46:03 +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 487E3C043B for ; Fri, 6 Jul 2018 03:46:03 +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 bZkwNjcNE5Er for ; Fri, 6 Jul 2018 03:46:02 +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 F25D05F4A2 for ; Fri, 6 Jul 2018 03:46: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 34082E12B0 for ; Fri, 6 Jul 2018 03:46:01 +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 5FA7727509 for ; Fri, 6 Jul 2018 03:46:00 +0000 (UTC) Date: Fri, 6 Jul 2018 03:46:00 +0000 (UTC) From: "Yuqi Wang (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (HADOOP-15528) Deprecate ContainerLaunch#link by using FileUtil#SymLink 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/HADOOP-15528?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 534409#comment-16534409 ]=20 Yuqi Wang edited comment on HADOOP-15528 at 7/6/18 3:45 AM: ------------------------------------------------------------ [~giovanni.fumarola], [~elgoiri],=C2=A0 Some concerns from my side (please correct me if I am wrong), please take a= look: # *Maybe Security and Resource Isolation Leak:* The *old behavior* is the symlink operation is *executed=C2=A0in the batch= script*, which is=C2=A0executed as a child process under some limited priv= ileged and resource isolation environment, such as windows job object (with= windows secure container) or linux cgroups, etc.=20 However, the *new behavior* is the=C2=A0symlink operation is *executed=C2= =A0by NM itself*, which=C2=A0is=C2=A0executed as a child process under=C2= =A0NM itself, it shares the same execution=C2=A0environment as NM. So, I worry about there may be some leak for=C2=A0Security, Resource Isola= tion, etc. # *Exit procedure is not straightforward and exit info is too less to debu= g.* For the PATCH implementation: It execute the=C2=A0symlink operation before container starts. If fails, i= t just record=C2=A0a=C2=A0"exit XXX" in batch script instead of throw the f= ailure to its caller. So, even if you execute symlink=C2=A0before container= starts, but the fail=C2=A0will not be propagated outside until the contain= er starts. So, if I try to debug a container failure, I will see there is a sudden "e= xit XXX" in the=C2=A0batch script without any other info for why NM add thi= s line there. I hope we can make the=C2=A0execution and propagate exit status in the sam= e execution=C2=A0environment, instead of split them into different. The old= =C2=A0behavior=C2=A0is all in=C2=A0batch script. But the new behavior split= them into NM and batch script. # *Better to have Retry:* For the PATCH=C2=A0implementation: A symlink error from container launch caller should be a transient error, = so you will also need to add the corresponding=C2=A0symlink failure exitcod= e into shouldCountTowardsMaxAttemptRetry. So RM will always retry the AM co= ntainer in=C2=A0face of=C2=A0symlink error. Overall, at least for the PATCH implementation, I did not see any benefits. was (Author: yqwang): [~giovanni.fumarola], [~elgoiri],=C2=A0 Some concerns from my side (please correct me if I am wrong), please take a= look: # *Maybe Security and Resource Isolation Leak:*** The *old behavior* is the symlink operation is *executed=C2=A0in the batch = script*, which is=C2=A0executed as a child process under some limited privi= leged and resource isolation environment, such as windows job object (with = windows secure container) or linux cgroups, etc.=20 However, the *new behavior* is the=C2=A0symlink operation is executed=C2=A0= by NM itself, which=C2=A0is=C2=A0executed as a child process under=C2=A0NM = itself, it shares the same execution=C2=A0environment as NM. So, I worry about there may be some leak for=C2=A0Security, Resource Isolat= ion, etc. # *Exit procedure is not straightforward and exit info is too less to debu= g.* For the PATCH implementation: It execute the=C2=A0symlink operation before container starts. If fails, it= just record=C2=A0a=C2=A0"exit XXX" in batch script instead of throw the fa= ilure to its caller. So, even if you execute symlink=C2=A0before container = starts, but the fail=C2=A0will not be propagated outside until the containe= r starts. So, if I try to debug a container failure, I will see there is a sudden "ex= it XXX" in the=C2=A0batch script without any other info for why NM add this= line there. I hope we can make the=C2=A0execution and propagate exit status in the same= execution=C2=A0environment, instead of split them into different. The old= =C2=A0behavior=C2=A0is all in=C2=A0batch script. But the new behavior split= them into NM and batch script. # *Better to have Retry:* For the PATCH=C2=A0implementation: A symlink error from container launch caller should be a transient error, s= o you will also need to add the corresponding=C2=A0symlink failure exitcode= into shouldCountTowardsMaxAttemptRetry. So RM will always retry the AM con= tainer in=C2=A0face of=C2=A0symlink error. Overall, at least for the PATCH implementation, I did not see any benefits. > Deprecate ContainerLaunch#link by using FileUtil#SymLink > -------------------------------------------------------- > > Key: HADOOP-15528 > URL: https://issues.apache.org/jira/browse/HADOOP-15528 > Project: Hadoop Common > Issue Type: Sub-task > Reporter: Giovanni Matteo Fumarola > Assignee: Giovanni Matteo Fumarola > Priority: Major > Attachments: HADOOP-15528-HADOOP-15461.v1.patch, HADOOP-15528-HAD= OOP-15461.v2.patch, HADOOP-15528-HADOOP-15461.v3.patch > > > {{ContainerLaunch}} currently uses its own utility to create links (inclu= ding winutils). > This should be deprecated and rely on {{FileUtil#SymLink}} which is alrea= dy multi-platform and pure Java. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org