You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
Then reverse-proxy works fine and curl - D - http://{orchestrator_ip}:{orchestrator_port}/api/clusters request returns correct information about known clusters both for a raft leader and its followers.
Then curl -D - -k https://{orchestrator_ip}:{orchestrator_port}/api/clusters request returns correct information only if it was sent to a raft leader. If it's sent to a follower, it returns 502 Bad Gateway and Orchestrator logs say: remote error: tls: bad certificate.
Expected behaviour:
reverse-proxy should work properly, so any follower should be able to provide requested information from its leader.
Creates a new proxy without any HTTP transport and starts serving HTTP . Since no transport is configured, a default HTTP transport is created automatically:
I don't really think so. It is about authentication and this issue is about wrong TLSClientConfig for Proxy transport.
Followers' logs were saying remote error: tls: bad certificate and leader's logs were saying: x509: certificate signed by unknown authority. And I don't have AuthenticationMethod set at all, so it's basically none.
The proposed PR was tested "manually" on a 3-members cluster and it solved the issue for me.
This issue is similar to #873
Actual behaviour:
When
orchestrator.conf.json
is configured that way:Then reverse-proxy works fine and
curl - D - http://{orchestrator_ip}:{orchestrator_port}/api/clusters
request returns correct information about known clusters both for a raft leader and its followers.But when it is configured that way:
Then
curl -D - -k https://{orchestrator_ip}:{orchestrator_port}/api/clusters
request returns correct information only if it was sent to a raft leader. If it's sent to a follower, it returns502 Bad Gateway
and Orchestrator logs say:remote error: tls: bad certificate
.Expected behaviour:
reverse-proxy
should work properly, so any follower should be able to provide requested information from its leader.Root cause analysis:
orchestrator/go/http/raft_reverse_proxy.go
Lines 46 to 47 in f818d8a
Creates a new proxy without any HTTP transport and starts serving HTTP . Since no transport is configured, a default HTTP transport is created automatically:
This works when SSL is disabled, but it breaks routing logic in the middle when it is enabled.
Workaround:
Sending all requests directly to a raft leader works pretty well both with and without SSL.
Solution proposal:
A suitable HTTP transport is already being created for raft health requests:
orchestrator/go/raft/http_client.go
Lines 37 to 68 in f818d8a
This code can be reused to get a proper HTTP transport for a reverse-proxy as well.
The text was updated successfully, but these errors were encountered: