You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Aswin Shakil (Jira)" <ji...@apache.org> on 2025/04/23 10:11:00 UTC

[jira] [Updated] (HDDS-12891) OMKeyAclRequestWithFSO is incorrectly setting full path as key name

     [ https://issues.apache.org/jira/browse/HDDS-12891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aswin Shakil updated HDDS-12891:
--------------------------------
    Description: 
When setting, removing, and adding an ACL, we incorrectly set the full key path as the key name. It should only be the leaf node name
For eg: 
*a/b/c/d/e/file1* is set a the key name thus corrupting the metadata table. Instead we should only set *file1* as the key name.

*Repro in Docker*
{code:java}
ozone freon ockg -n=2 -v=vol1 -b=bucket1 -p=test1/test2
ozone sh key setacl vol1/bucket1/test1/test2/0 -a=user:user1:rw
ozone debug ldb --db=/data/metadata/om.db scan --column_family=fileTable | grep keyName
{code}

*Without fix*
{code:java}
sh-5.1$ ozone debug ldb --db=/data/metadata/om.db scan --column_family=fileTable | grep keyName
  "keyName" : "test1/test2/0",
  "keyName" : "1",
{code}

*With fix*
{code:java}
sh-5.1$ ozone debug ldb --db=/data/metadata/om.db scan --column_family=fileTable | grep keyName
  "keyName" : "0",
  "keyName" : "1",
{code}




  was:
When setting, removing, and adding an ACL, we incorrectly set the full key path as the key name. It should only be the leaf node name
For eg: 
a/b/c/d/e/file1 is set a the key name thus corrupting the metadata table. Instead we should only set file1 as the key name.

# Repro in Docker
ozone freon ockg -n=2 -v=vol1 -b=bucket1 -p=test1/test2
ozone sh key setacl vol1/bucket1/test1/test2/0 -a=user:user1:rw
ozone debug ldb --db=/data/metadata/om.db scan --column_family=fileTable | grep keyName

# Without fix
sh-5.1$ ozone debug ldb --db=/data/metadata/om.db scan --column_family=fileTable | grep keyName
  "keyName" : "test1/test2/0",
  "keyName" : "1",

# With fix
sh-5.1$ ozone debug ldb --db=/data/metadata/om.db scan --column_family=fileTable | grep keyName
  "keyName" : "0",
  "keyName" : "1",




> OMKeyAclRequestWithFSO is incorrectly setting full path as key name
> -------------------------------------------------------------------
>
>                 Key: HDDS-12891
>                 URL: https://issues.apache.org/jira/browse/HDDS-12891
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Aswin Shakil
>            Assignee: Aswin Shakil
>            Priority: Major
>
> When setting, removing, and adding an ACL, we incorrectly set the full key path as the key name. It should only be the leaf node name
> For eg: 
> *a/b/c/d/e/file1* is set a the key name thus corrupting the metadata table. Instead we should only set *file1* as the key name.
> *Repro in Docker*
> {code:java}
> ozone freon ockg -n=2 -v=vol1 -b=bucket1 -p=test1/test2
> ozone sh key setacl vol1/bucket1/test1/test2/0 -a=user:user1:rw
> ozone debug ldb --db=/data/metadata/om.db scan --column_family=fileTable | grep keyName
> {code}
> *Without fix*
> {code:java}
> sh-5.1$ ozone debug ldb --db=/data/metadata/om.db scan --column_family=fileTable | grep keyName
>   "keyName" : "test1/test2/0",
>   "keyName" : "1",
> {code}
> *With fix*
> {code:java}
> sh-5.1$ ozone debug ldb --db=/data/metadata/om.db scan --column_family=fileTable | grep keyName
>   "keyName" : "0",
>   "keyName" : "1",
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org