-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/william/genrpc ssl port align #11813
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -1151,6 +1151,7 @@ translation("emqx") -> | |||||||||||||||||||||||||||||||||
translation("gen_rpc") -> | ||||||||||||||||||||||||||||||||||
[ | ||||||||||||||||||||||||||||||||||
{"default_client_driver", fun tr_gen_rpc_default_client_driver/1}, | ||||||||||||||||||||||||||||||||||
{"ssl_client_port", fun tr_gen_rpc_ssl_client_port/1}, | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is probably the only change needed.
but we have set the same server port on 5369 for both tcp and ssl: emqx/apps/emqx_conf/src/emqx_conf_schema.erl Lines 798 to 813 in a4ab744
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for completeness, we should actually add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually, to support There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we force all nodes in the cluster to use the same server port, then maybe just a translation is enough. but please also add the same tr for tcp_client_port. |
||||||||||||||||||||||||||||||||||
{"ssl_client_options", fun tr_gen_rpc_ssl_options/1}, | ||||||||||||||||||||||||||||||||||
{"ssl_server_options", fun tr_gen_rpc_ssl_options/1}, | ||||||||||||||||||||||||||||||||||
{"socket_ip", fun(Conf) -> | ||||||||||||||||||||||||||||||||||
|
@@ -1226,6 +1227,9 @@ collector_enabled(disabled, _) -> []. | |||||||||||||||||||||||||||||||||
tr_gen_rpc_default_client_driver(Conf) -> | ||||||||||||||||||||||||||||||||||
conf_get("rpc.protocol", Conf). | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
tr_gen_rpc_ssl_client_port(Conf) -> | ||||||||||||||||||||||||||||||||||
conf_get("rpc.ssl_server_port", Conf). | ||||||||||||||||||||||||||||||||||
zmstone marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
tr_gen_rpc_ssl_options(Conf) -> | ||||||||||||||||||||||||||||||||||
Ciphers = conf_get("rpc.ciphers", Conf), | ||||||||||||||||||||||||||||||||||
Versions = conf_get("rpc.tls_versions", Conf), | ||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Fix schema: RPC client ssl port alighn with configured server port. | ||
And ensure RPC ports are opened in helm chart. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,10 @@ spec: | |
{{- end }} | ||
- name: ekka | ||
containerPort: 4370 | ||
- name: genrpc-manual | ||
containerPort: 5369 | ||
- name: genrpc2-auto | ||
containerPort: 5370 | ||
Comment on lines
+126
to
+127
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there should be no need for this. ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need it for port port_discovery = stateless in gen_rpc, yes this is confusion. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. with the override set in docker entrypoint, i don't think we need this port. |
||
envFrom: | ||
- configMapRef: | ||
name: {{ include "emqx.fullname" . }}-env | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,10 @@ spec: | |
{{- end }} | ||
- name: ekka | ||
containerPort: 4370 | ||
- name: genrpc-manual | ||
containerPort: 5369 | ||
- name: genrpc2-auto | ||
containerPort: 5370 | ||
Comment on lines
+126
to
+127
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
envFrom: | ||
- configMapRef: | ||
name: {{ include "emqx.fullname" . }}-env | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this for redundance ? because it's set to manual in docker entrypoint script.
https://github.com/emqx/emqx/blob/master/deploy/docker/docker-entrypoint.sh#L52
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I thought it was auto-discovery as it is the default in the schema. I set it to manual want to test both. shall we remove it from docker-entrypoint? I don't see good reason to have it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or we should change the schema default to manual
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The override in docker entrypoint was added long ago, we keep it for backward compatibility reasons. (so that v4 and v5 has the same port mapping convention).
We cannot change the default in schema because for RPM/DEB/TGZ installation, it's offset based port mapping. --- also kept for backward compatibility reasons.