Fix rabbitmq ssl logic
Saying ! is_service_default($rabbit_use_ssl) and $rabbit_use_ssl is invalid logic: it checks that the value is not the ensure=>absent default and is also boolean true, when it should be checking whether it is boolean false. This was leading to an error where if the kombu_* parameters were not set but $rabbitmq_use_ssl was set to true, puppet would fail. It is valid to set rabbitmq_use_false to true while not setting the kombu_* parameters, it is just not valid the other way around. This change fixes the logic, adds checks for definition and truthiness of the kombu_* params, and fixes the error message. This makes the logic identical to the rabbitmq SSL handling in the neutron module[1]. [1] http://git.openstack.org/cgit/openstack/puppet-neutron/tree/manifests/init.pp#n356 Closes-Bug: #1356083 Change-Id: I1f4a67c4b8d43670793331254818b6991b8de640
This commit is contained in:
parent
c18e00e30f
commit
d850c3e34b
|
@ -619,15 +619,15 @@ class keystone(
|
|||
warning('Version string /v2.0/ should not be included in keystone::public_endpoint')
|
||||
}
|
||||
|
||||
if ! is_service_default($rabbit_use_ssl) and $rabbit_use_ssl {
|
||||
if is_service_default($kombu_ssl_ca_certs) {
|
||||
fail('The kombu_ssl_ca_certs parameter is required when rabbit_use_ssl is set to true')
|
||||
if ! is_service_default($rabbit_use_ssl) and !$rabbit_use_ssl {
|
||||
if ! is_service_default($kombu_ssl_ca_certs) and ($kombu_ssl_ca_certs) {
|
||||
fail('The kombu_ssl_ca_certs parameter requires rabbit_use_ssl to be set to true')
|
||||
}
|
||||
if is_service_default($kombu_ssl_certfile) {
|
||||
fail('The kombu_ssl_certfile parameter is required when rabbit_use_ssl is set to true')
|
||||
if ! is_service_default($kombu_ssl_certfile) and ($kombu_ssl_certfile) {
|
||||
fail('The kombu_ssl_certfile parameter requires rabbit_use_ssl to be set to true')
|
||||
}
|
||||
if is_service_default($kombu_ssl_keyfile) {
|
||||
fail('The kombu_ssl_keyfile parameter is required when rabbit_use_ssl is set to true')
|
||||
if ! is_service_default($kombu_ssl_keyfile) and ($kombu_ssl_keyfile) {
|
||||
fail('The kombu_ssl_keyfile parameter requires rabbit_use_ssl to be set to true')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue