You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Aryan Gupta (Jira)" <ji...@apache.org> on 2023/09/06 08:22:00 UTC

[jira] [Commented] (HDDS-7030) can not use boto3(python) to create or delete directory through s3gateway

    [ https://issues.apache.org/jira/browse/HDDS-7030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17762303#comment-17762303 ] 

Aryan Gupta commented on HDDS-7030:
-----------------------------------

Hi [~zingtc],
I tried to create the directory and delete it as mentioned in the description, it's working as expected,
I tried with all 3 bucket types i.e., LEGACY, OBS, and FSO, working as expected.

{code:java}
client.put_object(Bucket='test', Key='dict3/')
client.put_object(Bucket='test', Key='777/')
client.delete_object(Bucket='test', Key='777/')
aws s3 ls --endpoint http://localhost:9878 s3://test 
                           PRE dict3/
{code}


> can not use boto3(python) to create or delete directory through s3gateway
> -------------------------------------------------------------------------
>
>                 Key: HDDS-7030
>                 URL: https://issues.apache.org/jira/browse/HDDS-7030
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: S3
>    Affects Versions: 1.3.0
>         Environment: ozone related config
> ozone.om.enable.filesystem.paths:true
> ozone.om.metadata.layout:PREFIX
>            Reporter: zingtc
>            Assignee: Aryan Gupta
>            Priority: Major
>
>  I use boto3 to create/delete/rename a directory,but get some results not expected.
> demo code:
> import boto3
> client = boto3.client(service_name='s3', aws_access_key_id='xxx',
> aws_secret_access_key='xxx',
> region_name='s3v', use_ssl=False,
> endpoint_url='[http://xxx:32078')|http://xxx:32078')/]
>  # want to create directory but get a file
> client.put_object(Bucket='test', Key='dict3/')
>  # want to delete directory but not deleted, response HTTPStatusCode: 204
>  # the directory was created by ozone command: ozone fs -mkdir /s3v/test/777
> client.delete_object(Bucket='test', Key='777/')
> #  but not deleted response: HTTPStatusCode: 204
> client.delete_object(Bucket='test', Key='777')



--
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