Skip to content

Commit d6e16fb

Browse files
committed
release 2023-03-17
1 parent 1e63a8d commit d6e16fb

1 file changed

Lines changed: 22 additions & 5 deletions

File tree

src/main/java/org/apache/hadoop/fs/store/diag/S3ADiagnosticsInfo.java

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -651,10 +651,15 @@ protected void validateConfig(final Printout printout,
651651
String region = conf.getTrimmed(REGION, "").toLowerCase(Locale.ROOT);
652652
String bucket = getFsURI().getHost();
653653

654+
654655
boolean secureConnections = conf.getBoolean(SECURE_CONNECTIONS,
655656
DEFAULT_SECURE_CONNECTIONS);
656657
boolean pathStyleAccess = conf.getBoolean(PATH_STYLE_ACCESS, false);
657-
printout.println("Endpoint is set to \"%s\"", endpoint);
658+
printout.println("%s = \"%s\"", ENDPOINT, endpoint);
659+
printout.println("%s = \"%s\"", REGION, region);
660+
printout.println("%s = \"%s\"", PATH_STYLE_ACCESS, pathStyleAccess);
661+
printout.println("%s = \"%s\"", SECURE_CONNECTIONS, secureConnections);
662+
658663
if (endpoint.startsWith("https:") || endpoint.startsWith("http:")) {
659664
printout.warn("Value of %s looks like a URL: %s", ENDPOINT, endpoint);
660665
printout.println("It SHOULD normally be a hostname or IP address");
@@ -675,14 +680,19 @@ protected void validateConfig(final Printout printout,
675680
}
676681
} else if (endpoint.endsWith("amazonaws.cn")) {
677682
printout.println("AWS china is in use");
683+
} else if (endpoint.endsWith(".vpce.amazonaws.com")) {
684+
printout.println("AWS VPCE is being used for a VPN connection to S3");
685+
printout.warn("you MUST set %s to the region of this store; it is currently \"%s\"",
686+
REGION, region);
687+
printout.println("Note: older hadoop releases do not support this option");
688+
printout.println("See https://issues.apache.org/jira/browse/HADOOP-17705 for a workaround");
678689
} else if (!endpoint.contains(".amazonaws.")) {
679690
printout.println(
680691
"This does not appear to be an amazon endpoint, unless it is a VPN addresss.");
681692
if (region.isEmpty()) {
682693
printout.println("If this is a vpn link to aws, the AWS region MUST be set in %s",
683694
REGION);
684695
}
685-
686696
printout.println(
687697
"For third party endpoints, verify the network port and http protocol"
688698
+ " options are valid.");
@@ -694,16 +704,22 @@ protected void validateConfig(final Printout printout,
694704
+ " this is not the normal setting for third party stores.");
695705
printout.warn("It requires DNS to resolve all bucket hostnames");
696706
if (secureConnections) {
697-
printout.warn(
698-
"As https is in use, the certificates must also be wildcarded");
707+
printout.warn("As https is in use, the certificates must also be wildcarded");
699708
}
700709
}
701710
} else {
702711
printout.println("Endpoint is an AWS S3 store");
712+
if (region.isEmpty()) {
713+
printout.println("For reliable signing and performance the AWS region SHOULD be set in %s",
714+
REGION);
715+
}
703716

704717
}
718+
705719
printout.heading("Bucket Name validation");
706720

721+
printout.println("bucket name = \"%s\"", bucket);
722+
707723
if (bucket.contains(".")) {
708724
printout.warn("The bucket name %s contains dot '.'", bucket);
709725
printout.warn("AWS do not allow this on new buckets as it has problems");
@@ -722,11 +738,12 @@ protected void validateConfig(final Printout printout,
722738
printout.println("%d. To disable https, set %s to true", SECURE_CONNECTIONS, l++);
723739
}
724740
}
725-
printout.heading("Authentication");
726741
String dtbinding = conf.getTrimmed(DELEGATION_TOKEN_BINDING, "");
727742
String[] auth = conf.getStrings(AWS_CREDENTIALS_PROVIDER, "");
728743

729744
if (!dtbinding.isEmpty()) {
745+
printout.heading("Delegation Tokens");
746+
730747
printout.println("Delegation token binding %s is active", dtbinding);
731748
printout.println("This will take over authentication from the settings in %s",
732749
AWS_CREDENTIALS_PROVIDER);

0 commit comments

Comments
 (0)