manage_policyrcd: stop eventlet support from Newton

On Ubuntu Xenial, we're deploying Newton and UCA does not provide
keystone eventlet script anymore.

Change-Id: I33e565638f39ace819645215912303d6e431870c
This commit is contained in:
Emilien Macchi 2016-06-16 12:45:24 -04:00
parent c5a4ce6342
commit 50cdfe9678
3 changed files with 10 additions and 19 deletions

View File

@ -710,9 +710,14 @@ class keystone(
if $manage_policyrcd { if $manage_policyrcd {
# openstacklib::policyrcd only affects debian based systems. # openstacklib::policyrcd only affects debian based systems.
class { '::openstacklib::policyrcd': services => ['keystone', 'apache2'] }
Class['::openstacklib::policyrcd'] -> Package['keystone'] Class['::openstacklib::policyrcd'] -> Package['keystone']
Class['::openstacklib::policyrcd'] -> Package['httpd'] Class['::openstacklib::policyrcd'] -> Package['httpd']
# we don't have keystone service anymore starting from Newton
if ($::operatingsystem == 'Ubuntu') and (versioncmp($::operatingsystemmajrelease, '16') >= 0) {
class { '::openstacklib::policyrcd': services => ['apache2'] }
} else {
class { '::openstacklib::policyrcd': services => ['keystone', 'apache2'] }
}
} }
include ::keystone::db include ::keystone::db
@ -993,17 +998,6 @@ class keystone(
} elsif $service_name == 'httpd' { } elsif $service_name == 'httpd' {
include ::apache::params include ::apache::params
$service_name_real = $::apache::params::service_name $service_name_real = $::apache::params::service_name
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 { } else {
fail('Invalid service_name. Either keystone/openstack-keystone for running as a standalone service, or httpd for being run by a httpd server') fail('Invalid service_name. Either keystone/openstack-keystone for running as a standalone service, or httpd for being run by a httpd server')
} }

View File

@ -0,0 +1,4 @@
---
other:
- If you use Ubuntu Cloud Archives (Canonical) packages and you set manage_policyrcd
to true, you won't be able to deloy OpenStack Mitaka.

View File

@ -294,13 +294,6 @@ describe 'keystone' do
}.to raise_error(RSpec::Expectations::ExpectationNotMetError, /expected that the catalogue would contain Service\[#{platform_parameters[:service_name]}\]/) }.to raise_error(RSpec::Expectations::ExpectationNotMetError, /expected that the catalogue would contain Service\[#{platform_parameters[:service_name]}\]/)
end end
it { is_expected.to contain_class('keystone::service').with(
'ensure' => 'stopped',
'service_name' => platform_parameters[:service_name],
'enable' => false,
'validate' => false
)}
it { is_expected.to contain_service('httpd').with_before(/Anchor\[keystone::service::end\]/) }
it { is_expected.to contain_exec('restart_keystone').with( it { is_expected.to contain_exec('restart_keystone').with(
'command' => "service #{platform_parameters[:httpd_service_name]} restart", 'command' => "service #{platform_parameters[:httpd_service_name]} restart",
) } ) }