Skip to content

Commit e0df223

Browse files
committed
More info about region inference
1 parent 870df07 commit e0df223

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3RepositoryPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private static Region getDefaultRegion() {
101101
try {
102102
return DefaultAwsRegionProviderChain.builder().build().getRegion();
103103
} catch (Exception e) {
104-
logger.debug("failed to obtain region from default provider chain", e);
104+
logger.info("failed to obtain region from default provider chain", e);
105105
return null;
106106
}
107107
});

modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Service.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,14 @@ Region getClientRegion(S3ClientSettings clientSettings) {
269269
S3ClientSettings.REGION.getConcreteSettingForNamespace("CLIENT_NAME").getKey()
270270
);
271271
return Region.of(guessedRegion);
272+
} else {
273+
LOGGER.info(
274+
"""
275+
found S3 client with endpoint [{}] which does not map to a known AWS region; \
276+
to suppress this message, configure the [{}] setting on this node""",
277+
clientSettings.endpoint,
278+
S3ClientSettings.REGION.getConcreteSettingForNamespace("CLIENT_NAME").getKey()
279+
);
272280
}
273281
}
274282
final var defaultRegion = this.defaultRegion;

0 commit comments

Comments
 (0)