Remove qpid messaging support

Qpid messaging driver is removed from Oslo.messaging [1]
Therefore, we cannot support it anymore.

[1] I4a9cba314c4a2f24307504fa7b5427424268b114

Change-Id: I8a0c9293e943621fd556083e4aed413cb2b1f63c
This commit is contained in:
Denis Egorenko 2015-12-03 20:31:23 +03:00
parent 6ea0cd8fb4
commit 04a13fd862
4 changed files with 51 additions and 197 deletions

View File

@ -134,38 +134,6 @@
# (optional) Define queues as "durable" to rabbitmq.
# Defaults to false
#
# [*qpid_hostname*]
# (optional) Location of qpid server
# Defaults to 'localhost'
#
# [*qpid_port*]
# (optional) Port for qpid server
# Defaults to '5672'
#
# [*qpid_username*]
# (optional) Username to use when connecting to qpid
# Defaults to 'guest'
#
# [*qpid_password*]
# (optional) Password to use when connecting to qpid
# Defaults to 'guest'
#
# [*qpid_heartbeat*]
# (optional) Seconds between connection keepalive heartbeats
# Defaults to 60
#
# [*qpid_protocol*]
# (optional) Transport to use, either 'tcp' or 'ssl''
# Defaults to 'tcp'
#
# [*qpid_sasl_mechanisms*]
# (optional) Enable one or more SASL mechanisms
# Defaults to false
#
# [*qpid_tcp_nodelay*]
# (optional) Disable Nagle algorithm
# Defaults to true
#
# [*auth_strategy*]
# (optional) The strategy to use for auth: noauth or keystone.
# Defaults to 'keystone'
@ -328,7 +296,40 @@
# (optional) Sets a version cap for messages sent to scheduler services
# Defaults to undef
#
# DEPRECATED PARAMETERS
#
# [*qpid_hostname*]
# (optional) Location of qpid server
# Defaults to undef
#
# [*qpid_port*]
# (optional) Port for qpid server
# Defaults to undef
#
# [*qpid_username*]
# (optional) Username to use when connecting to qpid
# Defaults to undef
#
# [*qpid_password*]
# (optional) Password to use when connecting to qpid
# Defaults to undef
#
# [*qpid_heartbeat*]
# (optional) Seconds between connection keepalive heartbeats
# Defaults to undef
#
# [*qpid_protocol*]
# (optional) Transport to use, either 'tcp' or 'ssl''
# Defaults to undef
#
# [*qpid_sasl_mechanisms*]
# (optional) Enable one or more SASL mechanisms
# Defaults to undef
#
# [*qpid_tcp_nodelay*]
# (optional) Disable Nagle algorithm
# Defaults to undef
#
class nova(
$ensure_package = 'present',
$database_connection = undef,
@ -361,14 +362,6 @@ class nova(
$kombu_ssl_version = 'TLSv1',
$kombu_reconnect_delay = '1.0',
$amqp_durable_queues = false,
$qpid_hostname = 'localhost',
$qpid_port = '5672',
$qpid_username = 'guest',
$qpid_password = 'guest',
$qpid_sasl_mechanisms = false,
$qpid_heartbeat = 60,
$qpid_protocol = 'tcp',
$qpid_tcp_nodelay = true,
$auth_strategy = 'keystone',
$service_down_time = 60,
$log_dir = undef,
@ -405,6 +398,15 @@ class nova(
$upgrade_level_intercell = undef,
$upgrade_level_network = undef,
$upgrade_level_scheduler = undef,
# DEPRECATED PARAMETERS
$qpid_hostname = undef,
$qpid_port = undef,
$qpid_username = undef,
$qpid_password = undef,
$qpid_sasl_mechanisms = undef,
$qpid_heartbeat = undef,
$qpid_protocol = undef,
$qpid_tcp_nodelay = undef,
) inherits nova::params {
# maintain backward compatibility
@ -608,30 +610,7 @@ class nova(
# we keep "nova.openstack.common.rpc.impl_qpid" for backward compatibility
# but since Icehouse, "qpid" is enough.
if $rpc_backend == 'nova.openstack.common.rpc.impl_qpid' or $rpc_backend == 'qpid' {
nova_config {
'oslo_messaging_qpid/qpid_hostname': value => $qpid_hostname;
'oslo_messaging_qpid/qpid_port': value => $qpid_port;
'oslo_messaging_qpid/qpid_username': value => $qpid_username;
'oslo_messaging_qpid/qpid_password': value => $qpid_password, secret => true;
'oslo_messaging_qpid/qpid_heartbeat': value => $qpid_heartbeat;
'oslo_messaging_qpid/qpid_protocol': value => $qpid_protocol;
'oslo_messaging_qpid/qpid_tcp_nodelay': value => $qpid_tcp_nodelay;
}
if is_array($qpid_sasl_mechanisms) {
nova_config {
'oslo_messaging_qpid/qpid_sasl_mechanisms': value => join($qpid_sasl_mechanisms, ' ');
}
}
elsif $qpid_sasl_mechanisms {
nova_config {
'oslo_messaging_qpid/qpid_sasl_mechanisms': value => $qpid_sasl_mechanisms;
}
}
else {
nova_config {
'oslo_messaging_qpid/qpid_sasl_mechanisms': ensure => absent;
}
}
warning('Qpid driver is removed from Oslo.messaging in the Mitaka release')
}
# SSL Options

View File

@ -1,6 +1,6 @@
# == Class: nova::qpid
#
# Class for installing qpid server for nova
# Deprecated class for installing qpid server for nova
#
# === Parameters:
#
@ -25,33 +25,12 @@
# Defaults to 'OPENSTACK'
#
class nova::qpid(
$enabled = true,
$user = 'guest',
$password = 'guest',
$file = '/var/lib/qpidd/qpidd.sasldb',
$realm = 'OPENSTACK'
$enabled = undef,
$user = undef,
$password = undef,
$file = undef,
$realm = undef
) {
# only configure nova after the queue is up
Class['qpid::server'] -> Package<| title == 'nova-common' |>
if ($enabled) {
$service_ensure = 'running'
qpid_user { $user:
password => $password,
file => $file,
realm => $realm,
provider => 'saslpasswd2',
require => Class['qpid::server'],
}
} else {
$service_ensure = 'stopped'
}
class { '::qpid::server':
service_ensure => $service_ensure
}
warning('Qpid driver is removed from Oslo.messaging in the Mitaka release')
}

View File

@ -340,60 +340,6 @@ describe 'nova' do
end
end
context 'with qpid rpc_backend' do
let :params do
{ :rpc_backend => 'qpid' }
end
context 'with default parameters' do
it 'configures qpid' do
is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('qpid')
is_expected.to contain_nova_config('oslo_messaging_qpid/qpid_hostname').with_value('localhost')
is_expected.to contain_nova_config('oslo_messaging_qpid/qpid_port').with_value('5672')
is_expected.to contain_nova_config('oslo_messaging_qpid/qpid_username').with_value('guest')
is_expected.to contain_nova_config('oslo_messaging_qpid/qpid_password').with_value('guest').with_secret(true)
is_expected.to contain_nova_config('oslo_messaging_qpid/qpid_heartbeat').with_value('60')
is_expected.to contain_nova_config('oslo_messaging_qpid/qpid_protocol').with_value('tcp')
is_expected.to contain_nova_config('oslo_messaging_qpid/qpid_tcp_nodelay').with_value(true)
end
end
context 'with qpid_password parameter (without qpid_sasl_mechanisms)' do
before do
params.merge!({ :qpid_password => 'guest' })
end
it { is_expected.to contain_nova_config('oslo_messaging_qpid/qpid_sasl_mechanisms').with_ensure('absent') }
end
context 'with qpid_password parameter (with qpid_sasl_mechanisms)' do
before do
params.merge!({
:qpid_password => 'guest',
:qpid_sasl_mechanisms => 'A'
})
end
it { is_expected.to contain_nova_config('oslo_messaging_qpid/qpid_sasl_mechanisms').with_value('A') }
end
context 'with qpid_password parameter (with array of qpid_sasl_mechanisms)' do
before do
params.merge!({
:qpid_password => 'guest',
:qpid_sasl_mechanisms => [ 'DIGEST-MD5', 'GSSAPI', 'PLAIN' ]
})
end
it { is_expected.to contain_nova_config('oslo_messaging_qpid/qpid_sasl_mechanisms').with_value('DIGEST-MD5 GSSAPI PLAIN') }
end
end
context 'with qpid rpc_backend with old parameter' do
let :params do
{ :rpc_backend => 'nova.openstack.common.rpc.impl_qpid' }
end
it { is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('nova.openstack.common.rpc.impl_qpid') }
end
context 'with rabbitmq rpc_backend with old parameter' do
let :params do
{ :rpc_backend => 'nova.openstack.common.rpc.impl_kombu' }

View File

@ -1,50 +0,0 @@
require 'spec_helper'
describe 'nova::qpid' do
let :facts do
@default_facts.merge({:puppetversion => '2.7'})
end
describe 'with defaults' do
it 'should contain all of the default resources' do
is_expected.to contain_class('qpid::server').with(
:service_ensure => 'running',
:port => '5672'
)
end
it 'should contain user' do
is_expected.to contain_qpid_user('guest').with(
:password => 'guest',
:file => '/var/lib/qpidd/qpidd.sasldb',
:realm => 'OPENSTACK',
:provider => 'saslpasswd2'
)
end
end
describe 'when disabled' do
let :params do
{
:enabled => false
}
end
it 'should be disabled' do
is_expected.to_not contain_qpid_user('guest')
is_expected.to contain_class('qpid::server').with(
:service_ensure => 'stopped'
)
end
end
end