Fix ignored qdr::listener_* parameters

Closes-Bug: #2012200
Change-Id: If8ec5f0e698f1b198304cec45081cb6d0bbe1676
This commit is contained in:
Takashi Kajinami 2023-03-20 03:26:02 +09:00
parent 8c1faac656
commit 930cdd9783
4 changed files with 37 additions and 11 deletions

View File

@ -31,14 +31,17 @@ class qdr::config inherits qdr {
mode => '0644',
}
$show_diff = ($::qdr::listener_ssl_password == undef)
file { 'qdrouterd.conf' :
ensure => file,
path => $service_config_path,
content => template($service_config_template),
owner => '0',
group => '0',
mode => '0644',
notify => Class['qdr::service'],
ensure => file,
path => $service_config_path,
content => template($service_config_template),
owner => '0',
group => '0',
mode => '0644',
show_diff => $show_diff,
notify => Class['qdr::service'],
}
file { $router_debug_dump :

View File

@ -8,3 +8,8 @@ fixes:
- ``router_ra_interval``
- ``router_ra_interval_flux``
- ``router_remote_ls_max_age``
- ``listener_idle_timeout``
- ``listener_max_frame_size``
- ``listener_require_encrypt``
- ``listener_ssl_pw_file``
- ``listener_ssl_password``

View File

@ -81,6 +81,9 @@ describe 'qdr' do
should contain_file('qdrouterd.conf').with_content(/host: 127.0.0.1/)
should contain_file('qdrouterd.conf').with_content(/port: 5672/)
should contain_file('qdrouterd.conf').with_content(/authenticatePeer: false/)
should contain_file('qdrouterd.conf').with_content(/idleTimeoutSeconds: 16/)
should contain_file('qdrouterd.conf').with_content(/maxFrameSize: 16384/)
should contain_file('qdrouterd.conf').with_content(/requireEncryption: false/)
should contain_file('qdrouterd.conf').with_content(/saslMechanisms: ANONYMOUS/)
should contain_file('qdrouterd.conf').without_content(/sslProfile {/)
should contain_file('qdrouterd.conf').without_content(/connector {/)
@ -101,6 +104,9 @@ describe 'qdr' do
:listener_addr => '10.1.1.1',
:listener_port => '5671',
:listener_auth_peer => true,
:listener_idle_timeout => '32',
:listener_max_frame_size => '32768',
:listener_require_encrypt => true,
:listener_sasl_mech => 'ANONYMOUS DIGEST-MD5 EXTERNAL PLAIN',
:connectors => [{'role' => 'inter-router'}],
:extra_listeners => [{'mode' => 'interior'}],
@ -118,6 +124,9 @@ describe 'qdr' do
should contain_file('qdrouterd.conf').with_content(/host: 10.1.1.1/)
should contain_file('qdrouterd.conf').with_content(/port: 5671/)
should contain_file('qdrouterd.conf').with_content(/authenticatePeer: true/)
should contain_file('qdrouterd.conf').with_content(/idleTimeoutSeconds: 32/)
should contain_file('qdrouterd.conf').with_content(/maxFrameSize: 32768/)
should contain_file('qdrouterd.conf').with_content(/requireEncryption: true/)
should contain_file('qdrouterd.conf').with_content(/saslMechanisms: ANONYMOUS DIGEST-MD5 EXTERNAL PLAIN/)
should contain_file('qdrouterd.conf').with_content(/role: inter-router/)
should contain_file('qdrouterd.conf').with_content(/mode: interior/)

View File

@ -36,10 +36,16 @@ router {
<%- if @listener_require_ssl -%>
sslProfile {
name: <%= @router_id %>
certDb: <%= @listener_ssl_cert_db %>
certFile: <%= @listener_ssl_cert_file %>
keyFile: <%= @listener_ssl_key_file %>
name: <%= @router_id %>
certDb: <%= @listener_ssl_cert_db %>
certFile: <%= @listener_ssl_cert_file %>
keyFile: <%= @listener_ssl_key_file %>
<%- if @listener_ssl_pw_file -%>
passwordFile: <%= @listener_ssl_pw_file %>
<%- end -%>
<%- if @listener_ssl_password -%>
password: <%= @listener_ssl_password %>
<%- end -%>
}
<%- end -%>
@ -55,6 +61,9 @@ sslProfile {
listener {
host: <%= @listener_addr %>
port: <%= @listener_port %>
idleTimeoutSeconds: <%= @listener_idle_timeout %>
maxFrameSize: <%= @listener_max_frame_size %>
requireEncryption: <%= @listener_require_encrypt %>
<%- if @listener_require_ssl -%>
sslProfile: <%= @router_id %>
<%- end -%>