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

HDDS-11257. Ozone write does not work when http proxy is set for the JVM. #7036

Merged
merged 4 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ protected NettyChannelBuilder createChannel(DatanodeDetails dn, int port)
NettyChannelBuilder channelBuilder =
NettyChannelBuilder.forAddress(dn.getIpAddress(), port).usePlaintext()
.maxInboundMessageSize(OzoneConsts.OZONE_SCM_CHUNK_MAX_SIZE)
.proxyDetector(uri -> null)
.intercept(new GrpcClientInterceptor());
if (secConfig.isSecurityEnabled() && secConfig.isGrpcTlsEnabled()) {
SslContextBuilder sslContextBuilder = GrpcSslContexts.forClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ public GrpcReplicationClient(
NettyChannelBuilder channelBuilder =
NettyChannelBuilder.forAddress(host, port)
.usePlaintext()
.maxInboundMessageSize(OzoneConsts.OZONE_SCM_CHUNK_MAX_SIZE);
.maxInboundMessageSize(OzoneConsts.OZONE_SCM_CHUNK_MAX_SIZE)
.proxyDetector(uri -> null);

if (secConfig.isSecurityEnabled() && secConfig.isGrpcTlsEnabled()) {
channelBuilder.useTransportSecurity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public InterSCMGrpcClient(final String host,
TimeUnit.MILLISECONDS);
NettyChannelBuilder channelBuilder =
NettyChannelBuilder.forAddress(host, port).usePlaintext()
.maxInboundMessageSize(OzoneConsts.OZONE_SCM_CHUNK_MAX_SIZE);
.maxInboundMessageSize(OzoneConsts.OZONE_SCM_CHUNK_MAX_SIZE)
.proxyDetector(uri -> null);
SecurityConfig securityConfig = new SecurityConfig(conf);
if (securityConfig.isSecurityEnabled()
&& securityConfig.isGrpcTlsEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public void start() throws IOException {
NettyChannelBuilder channelBuilder =
NettyChannelBuilder.forAddress(hp.getHost(), hp.getPort())
.usePlaintext()
.proxyDetector(uri -> null)
.maxInboundMessageSize(maxSize);

if (secConfig.isSecurityEnabled() && secConfig.isGrpcTlsEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ public Void call() throws Exception {
.build();

NettyChannelBuilder channelBuilder =
NettyChannelBuilder.forTarget(serverAddress);
NettyChannelBuilder.forTarget(serverAddress)
.proxyDetector(uri -> null);
channelBuilder.negotiationType(NegotiationType.PLAINTEXT);
ManagedChannel build = channelBuilder.build();
stub = RaftServerProtocolServiceGrpc.newStub(build);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public Void call() throws Exception {
.build();

NettyChannelBuilder channelBuilder =
NettyChannelBuilder.forTarget(serverAddress);
NettyChannelBuilder.forTarget(serverAddress).proxyDetector(uri -> null);
channelBuilder.negotiationType(NegotiationType.PLAINTEXT);
ManagedChannel build = channelBuilder.build();
stub = RaftServerProtocolServiceGrpc.newStub(build);
Expand Down