Install python-redis if coordination url uses it
If tooz coordination is enabled and url is using redis lets ensure python-redis is installed. Change-Id: Iefe933f45353810200ec9c76ffc92f051db7a5e6
This commit is contained in:
parent
811df61d6c
commit
e50308cc6d
@ -31,6 +31,12 @@ class aodh::evaluator (
|
|||||||
aodh_config {
|
aodh_config {
|
||||||
'coordination/backend_url' : value => $coordination_url;
|
'coordination/backend_url' : value => $coordination_url;
|
||||||
}
|
}
|
||||||
|
if ($coordination_url =~ /^redis/ ) {
|
||||||
|
ensure_resource('package', 'python-redis', {
|
||||||
|
name => $::aodh::params::redis_package_name,
|
||||||
|
tag => 'openstack',
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ensure_resource( 'package', [$::aodh::params::evaluator_package_name],
|
ensure_resource( 'package', [$::aodh::params::evaluator_package_name],
|
||||||
|
@ -24,6 +24,7 @@ class aodh::params {
|
|||||||
$listener_service_name = 'openstack-aodh-listener'
|
$listener_service_name = 'openstack-aodh-listener'
|
||||||
$aodh_wsgi_script_path = '/var/www/cgi-bin/aodh'
|
$aodh_wsgi_script_path = '/var/www/cgi-bin/aodh'
|
||||||
$aodh_wsgi_script_source = '/usr/lib/python2.7/site-packages/aodh/api/app.wsgi'
|
$aodh_wsgi_script_source = '/usr/lib/python2.7/site-packages/aodh/api/app.wsgi'
|
||||||
|
$redis_package_name = 'python-redis'
|
||||||
}
|
}
|
||||||
'Debian': {
|
'Debian': {
|
||||||
$common_package_name = 'aodh-common'
|
$common_package_name = 'aodh-common'
|
||||||
@ -43,6 +44,7 @@ class aodh::params {
|
|||||||
$listener_service_name = 'aodh-listener'
|
$listener_service_name = 'aodh-listener'
|
||||||
$aodh_wsgi_script_path = '/usr/lib/cgi-bin/aodh'
|
$aodh_wsgi_script_path = '/usr/lib/cgi-bin/aodh'
|
||||||
$aodh_wsgi_script_source = '/usr/share/aodh/app.wsgi'
|
$aodh_wsgi_script_source = '/usr/share/aodh/app.wsgi'
|
||||||
|
$redis_package_name = 'python-redis'
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
fail("Unsupported osfamily: ${::osfamily} operatingsystem")
|
fail("Unsupported osfamily: ${::osfamily} operatingsystem")
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- Install python-redis if the coordination backend url is redis. This is
|
||||||
|
an indirect dependency on evaluator coordination to work.
|
@ -20,6 +20,13 @@ describe 'aodh::evaluator' do
|
|||||||
it 'configures backend_url' do
|
it 'configures backend_url' do
|
||||||
is_expected.to contain_aodh_config('coordination/backend_url').with_value('redis://localhost:6379')
|
is_expected.to contain_aodh_config('coordination/backend_url').with_value('redis://localhost:6379')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'installs python-redis package' do
|
||||||
|
is_expected.to contain_package(platform_params[:redis_package_name]).with(
|
||||||
|
:name => platform_params[:redis_package_name],
|
||||||
|
:tag => 'openstack'
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when enabled' do
|
context 'when enabled' do
|
||||||
@ -98,10 +105,12 @@ describe 'aodh::evaluator' do
|
|||||||
case facts[:osfamily]
|
case facts[:osfamily]
|
||||||
when 'Debian'
|
when 'Debian'
|
||||||
{ :evaluator_package_name => 'aodh-evaluator',
|
{ :evaluator_package_name => 'aodh-evaluator',
|
||||||
:evaluator_service_name => 'aodh-evaluator' }
|
:evaluator_service_name => 'aodh-evaluator',
|
||||||
|
:redis_package_name => 'python-redis' }
|
||||||
when 'RedHat'
|
when 'RedHat'
|
||||||
{ :evaluator_package_name => 'openstack-aodh-evaluator',
|
{ :evaluator_package_name => 'openstack-aodh-evaluator',
|
||||||
:evaluator_service_name => 'openstack-aodh-evaluator' }
|
:evaluator_service_name => 'openstack-aodh-evaluator',
|
||||||
|
:redis_package_name => 'python-redis' }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
it_configures 'aodh-evaluator'
|
it_configures 'aodh-evaluator'
|
||||||
|
Loading…
Reference in New Issue
Block a user