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

Gabor Bota commented on HADOOP-15754:
-------------------------------------

Had to fix 
{{AbstractS3GuardToolTestBase#testSetCapacityFailFastOnReadWriteOfZero}} too, 
because if there's no region set, it will fail with:
{noformat}
[ERROR] 
testSetCapacityFailFastOnReadWriteOfZero(org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB)
  Time elapsed: 2.121 s  <<< ERROR!
java.nio.file.AccessDeniedException: S3 client role lacks permission 
s3:GetBucketLocation for s3a://bucket
Caused by: java.nio.file.AccessDeniedException: bucket: getBucketLocation() on 
bucket: com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied 
(Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 
A511C83C764B02A8; S3 Extended Request ID: 
tGDU7Kl+FUN7hqCyHo30YGkDvNPe1b5mFP7OPDCPhEHdRzyiTlrfP90b/p+oB6ahaaQMoU/2ojg=), 
S3 Extended Request ID: 
tGDU7Kl+FUN7hqCyHo30YGkDvNPe1b5mFP7OPDCPhEHdRzyiTlrfP90b/p+oB6ahaaQMoU/2ojg=:AccessDenied
Caused by: com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied 
(Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 
A511C83C764B02A8; S3 Extended Request ID: 
tGDU7Kl+FUN7hqCyHo30YGkDvNPe1b5mFP7OPDCPhEHdRzyiTlrfP90b/p+oB6ahaaQMoU/2ojg=)
{noformat}

-

Tested on eu-west-1.

Test output with {{fs.s3a.s3guard.ddb.region}} set:
{noformat}
[INFO] Running org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB
[ERROR] Tests run: 11, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
140.708 s <<< FAILURE! - in 
org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB
[ERROR] 
testDestroyNoBucket(org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB)  
Time elapsed: 1.266 s  <<< ERROR!
java.lang.IllegalArgumentException: No DynamoDB table name configured

[INFO] Running org.apache.hadoop.fs.s3a.s3guard.ITestDynamoDBMetadataStore
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 206.605 
s - in org.apache.hadoop.fs.s3a.s3guard.ITestDynamoDBMetadataStore
{noformat}

Test output without {{fs.s3a.s3guard.ddb.region}} set:

{noformat}
[INFO] Running org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB
[WARNING] Tests run: 11, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 
109.912 s - in org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB
[INFO] Running org.apache.hadoop.fs.s3a.s3guard.ITestDynamoDBMetadataStore
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.001 s 
<<< FAILURE! - in org.apache.hadoop.fs.s3a.s3guard.ITestDynamoDBMetadataStore
[ERROR] org.apache.hadoop.fs.s3a.s3guard.ITestDynamoDBMetadataStore  Time 
elapsed: 0.001 s  <<< ERROR!
java.lang.IllegalArgumentException: No DynamoDB region configured
        at 
org.apache.hadoop.fs.s3a.s3guard.ITestDynamoDBMetadataStore.beforeClassSetup(ITestDynamoDBMetadataStore.java:150)
{noformat}

> s3guard: testDynamoTableTagging should clear existing config
> ------------------------------------------------------------
>
>                 Key: HADOOP-15754
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15754
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: 3.2.0
>            Reporter: Aaron Fabbri
>            Assignee: Gabor Bota
>            Priority: Minor
>         Attachments: HADOOP-15754.001.patch, HADOOP-15754.002.patch
>
>
> I recently committed HADOOP-14734 which adds support for tagging Dynamo DB 
> tables for S3Guard when they are created.
>  
> Later, when testing another patch, I hit a test failure because I still had a 
> tag option set in my test configuration (auth-keys.xml) that was adding my 
> own table tag.
> {noformat}
> [ERROR] 
> testDynamoTableTagging(org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB)
>   Time elapsed: 13.384 s  <<< FAILURE!
> java.lang.AssertionError: expected:<2> but was:<3>
>         at org.junit.Assert.fail(Assert.java:88)
>         at org.junit.Assert.failNotEquals(Assert.java:743)
>         at org.junit.Assert.assertEquals(Assert.java:118)
>         at org.junit.Assert.assertEquals(Assert.java:555)
>         at org.junit.Assert.assertEquals(Assert.java:542)
>         at 
> org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB.testDynamoTableTagging(ITestS3GuardToolDynamoDB.java:129)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>         at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>         at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>         at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>         at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>         at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>         at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
>         at 
> org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74){noformat}
> I think the solution is just to clear any tag.* options set in the 
> configuration at the beginning of the test.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to