Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HADOOP-18997. S3A: make createSession optional when working with S3Express buckets #6316

Merged

Conversation

steveloughran
Copy link
Contributor

@steveloughran steveloughran commented Dec 1, 2023

HADOOP-18997

New option fs.s3a.s3express.create.session; default is true.

  • Disabled in some of the role tests.
  • disables acl option in session tests if the acl test option is disabled.

I'm still seeing more role tests failing, where permissions aren't quite right.
That is: I get past the create session failures but still getting read/list errors.
Not sure what is wrong there ... advice from others needed.

But a lot of the session and role tests are now working

How was this patch tested?

adding the option to role tests and verifying they now work without needing create session role statements added.

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

New option fs.s3a.s3express.create.session; default is true.

Disabled in some of the role tests.

Change-Id: I8d3af8265525346a42cf3f5612a8d0130de4f1c6
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 23s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 3 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 31m 43s trunk passed
+1 💚 compile 0m 24s trunk passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 19s trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+1 💚 checkstyle 0m 21s trunk passed
+1 💚 mvnsite 0m 24s trunk passed
+1 💚 javadoc 0m 18s trunk passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 23s trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+1 💚 spotbugs 0m 45s trunk passed
+1 💚 shadedclient 19m 29s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 18s the patch passed
+1 💚 compile 0m 19s the patch passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 19s the patch passed
+1 💚 compile 0m 15s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+1 💚 javac 0m 15s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 12s /results-checkstyle-hadoop-tools_hadoop-aws.txt hadoop-tools/hadoop-aws: The patch generated 1 new + 5 unchanged - 0 fixed = 6 total (was 5)
+1 💚 mvnsite 0m 19s the patch passed
+1 💚 javadoc 0m 10s the patch passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 18s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+1 💚 spotbugs 0m 42s the patch passed
+1 💚 shadedclient 19m 9s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 10s hadoop-aws in the patch passed.
+1 💚 asflicense 0m 22s The patch does not generate ASF License warnings.
80m 57s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/1/artifact/out/Dockerfile
GITHUB PR #6316
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 7a501e78e781 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / cd41546
Default Java Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/1/testReport/
Max. process+thread count 614 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor Author

@steveloughran steveloughran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would like some advice from @ahmarsuhail about building the right IAM policy to issue createSession access to the active bucket, so we can dynamically generate the right permissions for delegation tokens. The PR currently just turns off createSession in those tests.

I'm also thinking we need to consider having a special test.s3express.enabled switch to turn on any specific tests we should add here.

  • verify turning off the session works (by assuming a role without it and reading a file)
  • try to connect to an unknown bucket and verify that it fails meaningfully
  • skip those distcp tests in treewalk
  • maybe: dynamically disable SSE encryption tests
  • future tests?

the core "is this an s3express bucket?" probe exists and we can use this to dynamically skip test suites/cases today.

@@ -4498,6 +4500,10 @@ public List<RoleModel.Statement> listAWSPolicyRules(
// way to predict read keys, and not worried about granting
// too much encryption access.
statements.add(STATEMENT_ALLOW_KMS_RW);
if (s3ExpressStore) {
// tODO
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, what do we add here?

// write access.
conf.set(CANNED_ACL, LOG_DELIVERY_WRITE);

if (conf.getBoolean(KEY_ACL_TESTS_ENABLED, false)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or do this automatically on an s3 express bucket; saves fiddling with so many settings when testing different storage types

* warn that policy rule can't be generated
* move ApiCallTimeoutException logic until after sdk exceptions get translated
  to IOE. This lines up for any future AWS throwing up underlying cause here.

Change-Id: Ife4071ed97d810df405297b62513b481576cf733
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 17m 46s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 3 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 48m 21s trunk passed
+1 💚 compile 0m 41s trunk passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 32s trunk passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 checkstyle 0m 30s trunk passed
+1 💚 mvnsite 0m 41s trunk passed
+1 💚 javadoc 0m 26s trunk passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 33s trunk passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 spotbugs 1m 8s trunk passed
+1 💚 shadedclient 37m 37s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 28s the patch passed
+1 💚 compile 0m 35s the patch passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 35s the patch passed
+1 💚 compile 0m 25s the patch passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 javac 0m 25s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 20s the patch passed
+1 💚 mvnsite 0m 31s the patch passed
+1 💚 javadoc 0m 15s the patch passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 24s the patch passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 spotbugs 1m 6s the patch passed
+1 💚 shadedclient 37m 27s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 45s hadoop-aws in the patch passed.
+1 💚 asflicense 0m 34s The patch does not generate ASF License warnings.
156m 27s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/2/artifact/out/Dockerfile
GITHUB PR #6316
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux fdb94053812f 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / d33b93b
Default Java Private Build-1.8.0_392-8u392-ga-1~20.04-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_392-8u392-ga-1~20.04-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/2/testReport/
Max. process+thread count 531 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@steveloughran steveloughran changed the title HADOOP-18997. S3A: createSession is optional when working with S3Express buckets C S3A: make createSession optional when working with S3Express buckets Dec 5, 2023
@steveloughran steveloughran changed the title C S3A: make createSession optional when working with S3Express buckets HADOOP-18997. S3A: make createSession optional when working with S3Express buckets Dec 5, 2023
* Tests to automatically skip acl, storage class, S3 Select or encryption tests
when target fs is S3Express.
* same for the out of order multipart uploader test cases, v1 listing.
* bucket tool s3 test treats invalid location error as a successful invocation
  of the create bucket attempt
* More disabling of CreateSession call with role tests.

A lot of role tests are still failing; looks like role policies aren't
being set up right.

Going to create a new JIRA for that as it's going to take time on its own
and is independent from the actual ability to disable sessions.

Change-Id: Ib3b3acd9f8a062526bdf958e3403992c2c9a0371
@steveloughran
Copy link
Contributor Author

tested s3express us-west. all the role tests are failing, but not in createsession; some other issue which I won't address here.

ITestS3ACommitterFactory seems unrelated; the setting of the invalid config isn't getting passed down. will create a jira there too.

[ERROR] Failures: 
[ERROR]   ITestS3ACommitterFactory.testEverything:115->testInvalidFileBinding:165 Expected a org.apache.hadoop.fs.s3a.commit.PathCommitException to be thrown, but got the result: : FileOutputCommitter{PathOutputCommitter{context=TaskAttemptContextImpl{JobContextImpl{jobId=job_202312050493_0007}; taskId=attempt_202312050493_0007_m_000000_0, status=''}; org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter@2421954a}; outputPath=s3a://stevel--usw2-az1--x-s3/fork-0007/test/testEverything, workPath=s3a://stevel--usw2-az1--x-s3/fork-0007/test/testEverything/_temporary/1/_temporary/attempt_202312050493_0007_m_000000_0, algorithmVersion=1, skipCleanup=false, ignoreCleanupFailures=false}
[ERROR] Errors: 
[ERROR]   ITestAssumeRole.testPartialDelete:696->executePartialDelete:732 » AccessDenied
[ERROR]   ITestAssumeRole.testPartialDeleteSingleDelete:702->executePartialDelete:732 » AccessDenied
[ERROR]   ITestAssumeRole.testReadOnlyOperations:463 » AccessDenied s3a://stevel--usw2-a...
[ERROR]   ITestAssumeRole.testRestrictedCommitActions:626 » AccessDenied s3a://stevel--u...
[ERROR]   ITestAssumeRole.testRestrictedWriteSubdir:513 » AccessDenied s3a://stevel--usw...
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testAbortNonexistentDir:234 » AccessDenied
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testBaseRelativePath:282 » AccessDenied
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testBulkCommitFiles:602 » AccessDenied
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testCommitEmptyFile:217->ITestCommitOperations.createCommitAndVerify:346 » AccessDenied
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testCommitSmallFile:223->ITestCommitOperations.createCommitAndVerify:346 » AccessDenied
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testCreateAbortEmptyFile:172 » AccessDenied
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testFailuresInAbortListing:566 » AccessDenied
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testMarkerFileRename:304 » AccessDenied
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testRevertCommit:544 » AccessDenied
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testRevertMissingCommit:556 » AccessDenied
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testUploadEmptyFile:472 » AccessDenied
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testUploadSmallFile:503 » AccessDenied
[ERROR]   ITestAssumedRoleCommitOperations>ITestCommitOperations.testWriteNormalStream:581 » AccessDenied
[ERROR]   ITestCustomSigner.testCustomSignerAndInitializer:135->runStoreOperationsAndVerify:155->lambda$runStoreOperationsAndVerify$0:160 » AWSBadRequest
[ERROR]   ITestCustomSigner.testCustomSignerAndInitializer:135->runStoreOperationsAndVerify:155->lambda$runStoreOperationsAndVerify$0:160 » AWSBadRequest
[ERROR]   ITestRestrictedReadAccess.testNoReadAccess:211->checkBasicFileOperations:283 » AccessDenied
[ERROR]   ITestRoleDelegationInFilesystem>ITestSessionDelegationInFilesystem.testDelegatedFileSystem:406->ITestSessionDelegationInFilesystem.executeDelegatedFSOperations:454 » AccessDenied
[ERROR]   ITestPartialRenamesDeletes.testCopyDirFailsToReadOnlyDir:519 » AccessDenied s3...
[ERROR]   ITestPartialRenamesDeletes.testCopyDirFailsToReadOnlyDir:519 » AccessDenied s3...
[ERROR]   ITestPartialRenamesDeletes.testPartialDirDelete:607 » AccessDenied s3a://steve...
[ERROR]   ITestPartialRenamesDeletes.testPartialDirDelete:607 » AccessDenied s3a://steve...
[ERROR]   ITestPartialRenamesDeletes.testPartialEmptyDirDelete:572 » AccessDenied s3a://...
[ERROR]   ITestPartialRenamesDeletes.testPartialEmptyDirDelete:572 » AccessDenied s3a://...
[ERROR]   ITestPartialRenamesDeletes.testRenameDirFailsInDelete:457 » AccessDenied s3a:/...
[ERROR]   ITestPartialRenamesDeletes.testRenameDirFailsInDelete:457 » AccessDenied s3a:/...
[ERROR]   ITestPartialRenamesDeletes.testRenameFileFailsNoWrite:503 » AccessDenied s3a:/...
[ERROR]   ITestPartialRenamesDeletes.testRenameFileFailsNoWrite:503 » AccessDenied s3a:/...
[ERROR]   ITestPartialRenamesDeletes.testRenameParentPathNotWriteable:393 » AccessDenied
[ERROR]   ITestPartialRenamesDeletes.testRenameParentPathNotWriteable:393 » AccessDenied
[ERROR]   ITestPartialRenamesDeletes.testRenamePermissionRequirements:756 » AccessDenied
[ERROR]   ITestPartialRenamesDeletes.testRenamePermissionRequirements:756 » AccessDenied
[ERROR]   ITestPartialRenamesDeletes.testRenameSingleFileFailsInDelete:416 » AccessDenied
[ERROR]   ITestPartialRenamesDeletes.testRenameSingleFileFailsInDelete:416 » AccessDenied

@steveloughran
Copy link
Contributor Author

@HarshitGupta11 @ahmarsuhail can I get this looked at? thanks.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 20s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 13 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 31m 54s trunk passed
+1 💚 compile 0m 25s trunk passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 20s trunk passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 checkstyle 0m 20s trunk passed
+1 💚 mvnsite 0m 24s trunk passed
+1 💚 javadoc 0m 17s trunk passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 22s trunk passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 spotbugs 0m 44s trunk passed
+1 💚 shadedclient 19m 21s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 18s the patch passed
+1 💚 compile 0m 20s the patch passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 20s the patch passed
+1 💚 compile 0m 14s the patch passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 javac 0m 14s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 12s /results-checkstyle-hadoop-tools_hadoop-aws.txt hadoop-tools/hadoop-aws: The patch generated 2 new + 10 unchanged - 0 fixed = 12 total (was 10)
+1 💚 mvnsite 0m 21s the patch passed
+1 💚 javadoc 0m 10s the patch passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 18s the patch passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 spotbugs 0m 45s the patch passed
+1 💚 shadedclient 19m 4s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 7s hadoop-aws in the patch passed.
+1 💚 asflicense 0m 24s The patch does not generate ASF License warnings.
80m 36s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/3/artifact/out/Dockerfile
GITHUB PR #6316
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 8bbf954c4a83 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 4c1756a
Default Java Private Build-1.8.0_392-8u392-ga-1~20.04-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_392-8u392-ga-1~20.04-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/3/testReport/
Max. process+thread count 559 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/3/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@ahmarsuhail ahmarsuhail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Some nits, but otherwise LGTM.

do you know what tests pass with disableCreateSession(conf) that weren't passing before? for me it doesn't seem to make a difference for a lot of them.

I'm asking internally why the LIST calls are failing for us. IAM permissions with S3Express have changed a bit, documented here. but without createSession, it should (i think) be the same. Once I have clarity there I will create the PR for https://issues.apache.org/jira/browse/HADOOP-19003

@@ -181,6 +189,10 @@ protected Configuration createValidRoleConf() throws JsonProcessingException {
conf.set(ASSUMED_ROLE_ARN, roleARN);
conf.set(ASSUMED_ROLE_SESSION_NAME, "valid");
conf.set(ASSUMED_ROLE_SESSION_DURATION, "45m");
// disable create session so there's no need to
// add a role policy for it.
disableCreateSession(conf);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what was happening without this? I am seeing the same failure on trunk and on this branch. for eg testPartialDelete fails on list for /test/testPartialDelete/file-1/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without this it was failing without createsession permissions. now its failing for s3: related IAM issues. progress

}
// disable create session so there's no need to
// add a role policy for it.
disableCreateSession(conf);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, I didn't see a difference in failure for testDelegatedFileSystem with and without this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should have got further

}

/**
* Skip a test if the filesystem lacks a required capability.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: update javadoc, i think this will skip if it has a capability

*/
public static void assumePathCapabilityFalse(FileSystem fs, String capability) {
try {
assume("Filesystem lacks capability " + capability,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think this should be "filesystem has capability"

@@ -118,7 +121,10 @@ public void testRecreateTestBucketS3Express() throws Throwable {
fsURI));
if (ex instanceof AWSBadRequestException) {
// owned error
assertExceptionContains(OWNED, ex);
if (!ex.getMessage().contains(OWNED)
&& !ex.getMessage().contains(INVALID_LOCATION)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when does the INVALID_LOCATION get thrown?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's some hardcoded expectations about region and if you test somewhere else it blows up.

Change-Id: I85d1685358f6e220b78528e7bc3e2018bce60b5a
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 48s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 13 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 48m 31s trunk passed
+1 💚 compile 0m 41s trunk passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 33s trunk passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 checkstyle 0m 31s trunk passed
+1 💚 mvnsite 0m 40s trunk passed
+1 💚 javadoc 0m 26s trunk passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 33s trunk passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 spotbugs 1m 7s trunk passed
+1 💚 shadedclient 37m 45s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 29s the patch passed
+1 💚 compile 0m 35s the patch passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 35s the patch passed
+1 💚 compile 0m 26s the patch passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 javac 0m 26s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 20s /results-checkstyle-hadoop-tools_hadoop-aws.txt hadoop-tools/hadoop-aws: The patch generated 2 new + 10 unchanged - 0 fixed = 12 total (was 10)
+1 💚 mvnsite 0m 31s the patch passed
+1 💚 javadoc 0m 15s the patch passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 24s the patch passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 spotbugs 1m 6s the patch passed
+1 💚 shadedclient 37m 21s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 43s hadoop-aws in the patch passed.
+1 💚 asflicense 0m 34s The patch does not generate ASF License warnings.
139m 49s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/4/artifact/out/Dockerfile
GITHUB PR #6316
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux b18de2a4c09f 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / d5bacf4
Default Java Private Build-1.8.0_392-8u392-ga-1~20.04-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_392-8u392-ga-1~20.04-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/4/testReport/
Max. process+thread count 606 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/4/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Change-Id: I7a78752628375927a781d9d9f8da8e1ac9bb07a3
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 48s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 13 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 48m 0s trunk passed
+1 💚 compile 0m 44s trunk passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 33s trunk passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 checkstyle 0m 31s trunk passed
+1 💚 mvnsite 0m 41s trunk passed
+1 💚 javadoc 0m 26s trunk passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 32s trunk passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 spotbugs 1m 7s trunk passed
+1 💚 shadedclient 37m 52s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 30s the patch passed
+1 💚 compile 0m 35s the patch passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 35s the patch passed
+1 💚 compile 0m 26s the patch passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 javac 0m 26s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 20s the patch passed
+1 💚 mvnsite 0m 32s the patch passed
+1 💚 javadoc 0m 14s the patch passed with JDK Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 25s the patch passed with JDK Private Build-1.8.0_392-8u392-ga-1~20.04-b08
+1 💚 spotbugs 1m 5s the patch passed
+1 💚 shadedclient 37m 30s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 44s hadoop-aws in the patch passed.
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
139m 39s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/5/artifact/out/Dockerfile
GITHUB PR #6316
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 9b7a246185a1 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 5c7bce4
Default Java Private Build-1.8.0_392-8u392-ga-1~20.04-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_392-8u392-ga-1~20.04-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/5/testReport/
Max. process+thread count 599 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6316/5/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@steveloughran steveloughran merged commit 25089dc into apache:trunk Dec 7, 2023
4 checks passed
jiajunmao pushed a commit to jiajunmao/hadoop-MLEC that referenced this pull request Feb 6, 2024
…ble S3Express CreateSession (apache#6316)


Adds a new option fs.s3a.s3express.create.session; default is true.

When false, this disables the CreateSession call to create/refresh temporary
session credentials when working with an Amazon S3 Express store.

This avoids having to give the caller the new IAM role permission,
at the expense of every remote call on the S3 Express store having to
include the latency of a checkup of IAM permissions.

* fs.s3a.s3express.create.session is set to false in tests which generate new
  role permissions and call AssumeRole
* move ApiCallTimeoutException logic until after sdk exceptions get translated
  to IOE. This lines up for any future AWS throwing up underlying cause here.
* Tests will automatically skip ACL, storage class, S3 Select or encryption tests
when target fs is S3Express.
* same for the out of order multipart uploader test cases, v1 listing.
* bucket tool s3 test treats invalid location error as a successful invocation
  of the create bucket attempt

Contributed by Steve Loughran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants