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

Enable QDR port 5671 to listen on both IPv4 and IPv6 #599

Merged
merged 4 commits into from
Jun 10, 2024
Merged
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion roles/servicetelemetry/tasks/component_qdr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
prefix: ceilometer
edgeListeners:
- expose: true
host: 0.0.0.0
host: ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just note:

While documentation [1] says that empty string makes QDR listen on all local interfaces and [::] makes QDR listen on all IPv6 addresses, my manual testing with those two values was not successful:

case 1:

2024-05-29 19:04:10.899935 +0000 CONN_MGR (info) Configured Listener: '':5999 proto=any, role=normal
2024-05-29 19:04:10.909703 +0000 SERVER (notice) Operational, 4 Threads Running (process ID 1)
2024-05-29 19:04:10.909981 +0000 SERVER (notice) Process VmSize 114.67 MiB (125.40 GiB available memory)
2024-05-29 19:04:10.910211 +0000 SERVER (error) Listener error on '':5999: Name or service not known - listen on '':5999 (proton:io)
2024-05-29 19:04:10.910241 +0000 SERVER (critical) Shutting down, required listener failed '':5999

case2:

2024-05-29 19:11:11.596032 +0000 CONN_MGR (info) Configured Listener: [::]:5999 proto=any, role=normal
2024-05-29 19:11:11.601813 +0000 SERVER (notice) Operational, 4 Threads Running (process ID 1)
2024-05-29 19:11:11.601937 +0000 SERVER (notice) Process VmSize 114.67 MiB (125.40 GiB available memory)
2024-05-29 19:11:11.602230 +0000 SERVER (error) Listener error on [::]:5999: Name or service not known - listen on [::]:5999 (proton:io)
2024-05-29 19:11:11.602280 +0000 SERVER (critical) Shutting down, required listener failed [::]:5999

The only possible way to force QDR to listen on IPv6 address was to use the address explicitly.

[1] https://qpid.apache.org/releases/qpid-dispatch-1.17.0/man/qdrouterd.conf.html#_listener

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is not official since my local build environment was giving me trouble today, but:

  • I edited my Interconnect object to say host: '' like in this patch
  • OCP returns it to me with empty double-quotes instead
$ oc get Interconnect -o yaml | grep host
      host: ""
  • The operator renders the config file with no host field at all
$ oc rsh pod/default-interconnect-574d468757-wshtn grep -C 4 "port: 5671" /opt/interconnect/etc/qdrouterd.conf
}

listener {
   role: edge
   port: 5671
   saslMechanisms: PLAIN
   authenticatePeer: true
   sslProfile: openstack
}

  • qdr is listening on both protocols
$ oc rsh pod/default-interconnect-574d468757-wshtn netstat -anp | grep :5671
tcp        0      0 0.0.0.0:5671            0.0.0.0:*               LISTEN      1/qdrouterd         
tcp6       0      0 :::5671                 :::*                    LISTEN      1/qdrouterd 

Note that this was done on top of upstream builds and by manually editing the Interconnect object, not from actually running this PR code. I'll need to figure out what's wrong with my cluster; I think I'm just using it for too many things at once.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also tried this with no host field in the Interconnect object at all, and the results were the same. Maybe that's the preferred way to write it to prevent any future doubts about the problems Martin has shown.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
host: ''

port: 5671
{% if servicetelemetry_vars.transports.qdr.auth == "basic" %}
saslMechanisms: PLAIN
Expand Down