From hdfs-issues-return-213819-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Tue Mar 20 14:53: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 C4FBE18064A for ; Tue, 20 Mar 2018 14:53:03 +0100 (CET) Received: (qmail 65905 invoked by uid 500); 20 Mar 2018 13:53:02 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 65894 invoked by uid 99); 20 Mar 2018 13:53:02 -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; Tue, 20 Mar 2018 13:53:02 +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 1E824180657 for ; Tue, 20 Mar 2018 13:53:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 0OLN4Wb-jook for ; Tue, 20 Mar 2018 13:53: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 E6CD55F56A for ; Tue, 20 Mar 2018 13:53: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 6C85BE021E for ; Tue, 20 Mar 2018 13:53: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 25563214BE for ; Tue, 20 Mar 2018 13:53:00 +0000 (UTC) Date: Tue, 20 Mar 2018 13:53:00 +0000 (UTC) From: "Rushabh S Shah (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-13292) Crypto command should give proper exception when key is already exist for zone directory 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/HDFS-13292?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1640= 6351#comment-16406351 ]=20 Rushabh S Shah commented on HDFS-13292: --------------------------------------- {quote}=C2=A0I think because of=C2=A0{{.Trash}}=C2=A0it is giving "non empt= y directory exception". {quote} Yup, you are right. For some reason I missed the fact that it created EZ wi= th key1 and it was failing while trying to create EZ with key2. bq.But in current code it is 3, 1, 2.=20 I don't have any preference regarding the order of steps in which they occu= r as long as it throws an exception and not succeed. The only downside of throwing {{not an empty directory}} exception first is= some user might delete the contents of directory and not realize it is alr= eady in an EZ. Since creation of zone is a super-user command only, I would expect the adm= in will have some basic understanding of this command. > Crypto command should give proper exception when key is already exist for= zone directory > -------------------------------------------------------------------------= --------------- > > Key: HDFS-13292 > URL: https://issues.apache.org/jira/browse/HDFS-13292 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs, kms > Affects Versions: 2.8.3 > Reporter: Harshakiran Reddy > Priority: Major > > {{Scenario:}} > # Create a Dir > # Create EZ for the above dir with Key1 > # Again you can try to create ZONE for same directory with Diff Key i.e = Key2 > {noformat} > hadoopclient> hadoop key list > Listing keys for KeyProvider: org.apache.hadoop.crypto.key.kms.LoadBalanc= ingKMSClientProvider@152aa092 > key2 > key1 > hadoopclient> hdfs dfs -mkdir /kms > hadoopclient> hdfs dfs -put bigdata_env /kms/file1 > hadoopclient> hdfs crypto -createZone -keyName key1 -path /kms > RemoteException: Attempt to create an encryption zone for a non-empty dir= ectory. > hadoopclient> hdfs dfs -rmr /kms/file1 > rmr: DEPRECATED: Please use '-rm -r' instead. > Deleted /kms/file1 > hadoopclient> hdfs crypto -createZone -keyName key1 -path /kms > Added encryption zone /kms > hadoopclient> hdfs crypto -createZone -keyName key2 -path /kms > RemoteException: Attempt to create an encryption zone for a non-empty dir= ectory. > hadoopclient> > =C2=A0{noformat} > Actual Output: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > {{Exception should be Like Dir already having the ZONE will not allow to = create new ZONE on this Dir}} > Expected Output: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > {{RemoteException:Attempt to create an encryption zone for non-empty dire= ctory}} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org