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

[jira] [Comment Edited] (HDDS-8013) Freon S3 bucket creation test should use unique prefix

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

Attila Doroszlai edited comment on HDDS-8013 at 9/6/23 3:13 PM:
----------------------------------------------------------------

Freon S3 bucket creation is tested by {{hadoop-ozone/dist/src/main/smoketest/s3/freon.robot}}.  The keyword {{Freon S3BG}} has a parameter for {{prefix}}, but it's not specified by the test case, so it's always {{s3bg}}.  We could pass something like {{s3bg-${BUCKET}}} instead.

{code}
--- hadoop-ozone/dist/src/main/smoketest/s3/freon.robot
+++ hadoop-ozone/dist/src/main/smoketest/s3/freon.robot
@@ -41,4 +41,4 @@ Freon S3BG
 *** Test Cases ***
 Run Freon S3BG
     [Setup]    Setup aws credentials
-    Freon S3BG
+    Freon S3BG   s3bg-${BUCKET}
{code}

Actually, Freon S3 bucket creation test is independent of the bucket type being used, so we should tag {{s3/freon.robot}} as:

{code}
Default Tags        no-bucket-type
{code}

This way the test could be skipped on subsequent executions:

{code:title=https://github.com/apache/ozone/blob/6657d0c7781148bf17248923d60b94ca7661566f/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test.sh#L44-L49}
exclude=""
for bucket in encrypted link; do
  execute_robot_test s3g -v BUCKET:${bucket} -N s3-${bucket} ${exclude} s3
  # some tests are independent of the bucket type, only need to be run once
  exclude="--exclude no-bucket-type"
done
{code}

https://github.com/adoroszlai/hadoop-ozone/commits/HDDS-8013


was (Author: adoroszlai):
Freon S3 bucket creation is tested by {{hadoop-ozone/dist/src/main/smoketest/s3/freon.robot}}.  The keyword {{Freon S3BG}} has a parameter for {{prefix}}, but it's not specified by the test case, so it's always {{s3bg}}.  We could pass something like {{s3bg-${BUCKET}}} instead.

{code}
--- hadoop-ozone/dist/src/main/smoketest/s3/freon.robot
+++ hadoop-ozone/dist/src/main/smoketest/s3/freon.robot
@@ -41,4 +41,4 @@ Freon S3BG
 *** Test Cases ***
 Run Freon S3BG
     [Setup]    Setup aws credentials
-    Freon S3BG
+    Freon S3BG   s3bg-${BUCKET}
{code}

Actually, Freon S3 bucket creation test is independent of the bucket type being used, so we should tag {{s3/freon.robot}} as:

{code}
Default Tags        no-bucket-type
{code}

This way the test could be skipped on subsequent executions:

{code:title=https://github.com/apache/ozone/blob/6657d0c7781148bf17248923d60b94ca7661566f/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test.sh#L44-L49}
exclude=""
for bucket in encrypted link; do
  execute_robot_test s3g -v BUCKET:${bucket} -N s3-${bucket} ${exclude} s3
  # some tests are independent of the bucket type, only need to be run once
  exclude="--exclude no-bucket-type"
done
{code}

> Freon S3 bucket creation test should use unique prefix
> ------------------------------------------------------
>
>                 Key: HDDS-8013
>                 URL: https://issues.apache.org/jira/browse/HDDS-8013
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: test
>            Reporter: Attila Doroszlai
>            Assignee: Saketa Chalamchala
>            Priority: Major
>              Labels: newbie
>
> S3 smoketests are executed with various bucket types (normal, link, encrypted, EC).  Freon bucket creation test should use a unique prefix for each, because using the same prefix for all tests prevents testing actual bucket creation.
> {code}
> 2023-02-22 14:45:19,441 | INFO  | OMAudit | user=dlfknslnfslf | ip=172.19.0.8 | op=CREATE_BUCKET {volume=s3v, bucket=s3bg78, bucketLayout=FILE_SYSTEM_OPTIMIZED, gdprEnabled=null, acls=[user:dlfknslnfslf:a[ACCESS]], isVersionEnabled=false, storageType=DISK, creationTime=1677077119437, bucketEncryptionKey=null, modificationTime=1677077119437, usedBytes=0, usedNamespace=0} | ret=SUCCESS |  
> 2023-02-22 14:50:26,271 | ERROR | OMAudit | user=dlfknslnfslf | ip=172.19.0.8 | op=CREATE_BUCKET {volume=s3v, bucket=s3bg78, bucketLayout=FILE_SYSTEM_OPTIMIZED, gdprEnabled=null, acls=[user:dlfknslnfslf:a[ACCESS]], isVersionEnabled=false, storageType=DISK, creationTime=1677077426249, bucketEncryptionKey=null, modificationTime=1677077426249, usedBytes=0, usedNamespace=0} | ret=FAILURE | BUCKET_ALREADY_EXISTS org.apache.hadoop.ozone.om.exceptions.OMException: Bucket already exist
> 2023-02-22 14:54:25,583 | ERROR | OMAudit | user=dlfknslnfslf | ip=172.19.0.8 | op=CREATE_BUCKET {volume=s3v, bucket=s3bg78, bucketLayout=FILE_SYSTEM_OPTIMIZED, gdprEnabled=null, acls=[user:dlfknslnfslf:a[ACCESS]], isVersionEnabled=false, storageType=DISK, creationTime=1677077665575, bucketEncryptionKey=null, modificationTime=1677077665575, usedBytes=0, usedNamespace=0} | ret=FAILURE | BUCKET_ALREADY_EXISTS org.apache.hadoop.ozone.om.exceptions.OMException: Bucket already exist
> {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