Merge "stop managing eventlet service on RedHat"
This commit is contained in:
commit
4e386acb4e
@ -948,16 +948,18 @@ class keystone(
|
||||
warning('Keystone under Eventlet has been deprecated during the Kilo cycle. Support for deploying under eventlet will be dropped as of the M-release of OpenStack.')
|
||||
} elsif $service_name == 'httpd' {
|
||||
include ::apache::params
|
||||
class { '::keystone::service':
|
||||
ensure => 'stopped',
|
||||
service_name => $::keystone::params::service_name,
|
||||
enable => false,
|
||||
validate => false,
|
||||
}
|
||||
$service_name_real = $::apache::params::service_name
|
||||
# leave this here because Ubuntu packages will start Keystone and we need it stopped
|
||||
# before apache can run
|
||||
Service['keystone'] -> Service[$service_name_real]
|
||||
if $::osfamily == 'Debian' {
|
||||
class { '::keystone::service':
|
||||
ensure => 'stopped',
|
||||
service_name => $::keystone::params::service_name,
|
||||
enable => false,
|
||||
validate => false,
|
||||
}
|
||||
# leave this here because Ubuntu packages will start Keystone and we need it stopped
|
||||
# before apache can run
|
||||
Service['keystone'] -> Service[$service_name_real]
|
||||
}
|
||||
} else {
|
||||
fail('Invalid service_name. Either keystone/openstack-keystone for running as a standalone service, or httpd for being run by a httpd server')
|
||||
}
|
||||
|
@ -270,7 +270,7 @@ describe 'keystone' do
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for "when using default class parameters for httpd" do
|
||||
shared_examples_for "when using default class parameters for httpd on Debian" do
|
||||
let :params do
|
||||
httpd_params
|
||||
end
|
||||
@ -299,6 +299,29 @@ describe 'keystone' do
|
||||
) }
|
||||
end
|
||||
|
||||
shared_examples_for "when using default class parameters for httpd on RedHat" do
|
||||
let :params do
|
||||
httpd_params
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
'include ::keystone::wsgi::apache'
|
||||
end
|
||||
|
||||
it_configures 'core keystone examples', httpd_params
|
||||
|
||||
it do
|
||||
expect {
|
||||
is_expected.to contain_service(platform_parameters[:service_name]).with('ensure' => 'running')
|
||||
}.to raise_error(RSpec::Expectations::ExpectationNotMetError, /expected that the catalogue would contain Service\[#{platform_parameters[:service_name]}\]/)
|
||||
end
|
||||
|
||||
it { is_expected.to contain_service('httpd').with_before(/Anchor\[keystone::service::end\]/) }
|
||||
it { is_expected.to contain_exec('restart_keystone').with(
|
||||
'command' => "service #{platform_parameters[:httpd_service_name]} restart",
|
||||
) }
|
||||
end
|
||||
|
||||
describe 'when using invalid service name for keystone' do
|
||||
let (:params) { {'service_name' => 'foo'}.merge(default_params) }
|
||||
|
||||
@ -931,7 +954,7 @@ describe 'keystone' do
|
||||
}
|
||||
end
|
||||
|
||||
it_configures 'when using default class parameters for httpd'
|
||||
it_configures 'when using default class parameters for httpd on RedHat'
|
||||
it_configures 'when configuring default domain'
|
||||
end
|
||||
|
||||
@ -951,7 +974,7 @@ describe 'keystone' do
|
||||
}
|
||||
end
|
||||
|
||||
it_configures 'when using default class parameters for httpd'
|
||||
it_configures 'when using default class parameters for httpd on Debian'
|
||||
it_configures 'when configuring default domain'
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user