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 5C923200D2B for ; Thu, 2 Nov 2017 21:51:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5B0E8160BE5; Thu, 2 Nov 2017 20:51:07 +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 9DC6A1609EB for ; Thu, 2 Nov 2017 21:51:06 +0100 (CET) Received: (qmail 69947 invoked by uid 500); 2 Nov 2017 20:51:05 -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 69936 invoked by uid 99); 2 Nov 2017 20:51:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2017 20:51:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 00B5E1812A0 for ; Thu, 2 Nov 2017 20:51:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 3OtU9PhnNw9V for ; Thu, 2 Nov 2017 20:51:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 08B0F5FBEA for ; Thu, 2 Nov 2017 20:51:03 +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 248DBE0F4E for ; Thu, 2 Nov 2017 20:51: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 750852415D for ; Thu, 2 Nov 2017 20:51:00 +0000 (UTC) Date: Thu, 2 Nov 2017 20:51:00 +0000 (UTC) From: "Eric Badger (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (YARN-5793) Trim configuration values in DockerLinuxContainerRuntime MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 02 Nov 2017 20:51:07 -0000 [ https://issues.apache.org/jira/browse/YARN-5793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eric Badger updated YARN-5793: ------------------------------ Issue Type: Sub-task (was: Bug) Parent: YARN-3611 > Trim configuration values in DockerLinuxContainerRuntime > -------------------------------------------------------- > > Key: YARN-5793 > URL: https://issues.apache.org/jira/browse/YARN-5793 > Project: Hadoop YARN > Issue Type: Sub-task > Components: nodemanager > Affects Versions: 3.0.0-alpha1 > Reporter: Tianyin Xu > Assignee: Tianyin Xu > Priority: Minor > Fix For: 2.9.0, 3.0.0-alpha2 > > Attachments: YARN-5793.0000.patch, YARN-5793.0001.patch > > > The current implementation of {{DockerLinuxContainerRuntime}} does not follow the practice of trimming configuration values. This leads to errors if users set values containing space or newline. > see the following YARN commits as reference: > YARN-3395. FairScheduler: Trim whitespaces when using username for queuename. > YARN-2869. CapacityScheduler should trim sub queue names when parse configuration. > YARN-2843. Fixed NodeLabelsManager to trim inputs for hosts and labels so as to make them work correctly. > and many other Hadoop/HDFS commits (just list a few): > HDFS-9708. FSNamesystem.initAuditLoggers() doesn't trim classnames > HDFS-2799. Trim fs.checkpoint.dir values. > HADOOP-6578. Configuration should trim whitespace around a lot of value types > HADOOP-6534. Trim whitespace from directory lists initializing > Patch is available against trunk > {code:title=DockerLinuxContainerRuntime.java|borderStyle=solid} > @@ -219,9 +219,9 @@ public void initialize(Configuration conf) > dockerClient = new DockerClient(conf); > allowedNetworks.clear(); > allowedNetworks.addAll(Arrays.asList( > - conf.getStrings(YarnConfiguration.NM_DOCKER_ALLOWED_CONTAINER_NETWORKS, > + conf.getTrimmedStrings(YarnConfiguration.NM_DOCKER_ALLOWED_CONTAINER_NETWORKS, > YarnConfiguration.DEFAULT_NM_DOCKER_ALLOWED_CONTAINER_NETWORKS))); > - defaultNetwork = conf.get( > + defaultNetwork = conf.getTrimmed( > YarnConfiguration.NM_DOCKER_DEFAULT_CONTAINER_NETWORK, > YarnConfiguration.DEFAULT_NM_DOCKER_DEFAULT_CONTAINER_NETWORK); > > @@ -237,7 +237,7 @@ public void initialize(Configuration conf) > throw new ContainerExecutionException(message); > } > > - privilegedContainersAcl = new AccessControlList(conf.get( > + privilegedContainersAcl = new AccessControlList(conf.getTrimmed( > YarnConfiguration.NM_DOCKER_PRIVILEGED_CONTAINERS_ACL, > YarnConfiguration.DEFAULT_NM_DOCKER_PRIVILEGED_CONTAINERS_ACL)); > } > @@ -439,7 +439,7 @@ public void launchContainer(ContainerRuntimeContext ctx) > LOCALIZED_RESOURCES); > @SuppressWarnings("unchecked") > List userLocalDirs = ctx.getExecutionAttribute(USER_LOCAL_DIRS); > - Set capabilities = new HashSet<>(Arrays.asList(conf.getStrings( > + Set capabilities = new HashSet<>(Arrays.asList(conf.getTrimmedStrings( > YarnConfiguration.NM_DOCKER_CONTAINER_CAPABILITIES, > YarnConfiguration.DEFAULT_NM_DOCKER_CONTAINER_CAPABILITIES))); > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org