Enable nova service by default
This commit updates the default value for enable for nova components to default to true, instead of false. Without this change the nova service is not enabled by default resulting in a different behavior than with other puppet openstack modules. Associated tests are updated to expect the change in defaults. Co-Authored-By: Cody Herriges <cody@puppetlabs.com> Change-Id: I49fc84f9fedfe00d7846441e1b49334abb09e0eb Closes-bug: #1220473
This commit is contained in:
parent
bf7db41d20
commit
895e057abb
|
@ -9,7 +9,7 @@
|
|||
#
|
||||
# [*enabled*]
|
||||
# (optional) Whether the nova api service will be run
|
||||
# Defaults to false
|
||||
# Defaults to true
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (optional) Whether to start/stop the service
|
||||
|
@ -148,7 +148,7 @@
|
|||
#
|
||||
class nova::api(
|
||||
$admin_password,
|
||||
$enabled = false,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$auth_uri = false,
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#
|
||||
# [*enabled*]
|
||||
# Use Nova Cells or not
|
||||
# Defaults to 'False'
|
||||
# Defaults to true
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (optional) Whether to start/stop the service
|
||||
|
@ -150,7 +150,7 @@ class nova::cells (
|
|||
$create_cells = true,
|
||||
$db_check_interval = '60',
|
||||
$driver = 'nova.cells.rpc_driver.CellsRPCDriver',
|
||||
$enabled = false,
|
||||
$enabled = true,
|
||||
$ensure_package = 'present',
|
||||
$instance_updated_at_threshold = '3600',
|
||||
$instance_update_num_instances = '1',
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# [*enabled*]
|
||||
# (optional) Whether or not to enable the nova cert service
|
||||
# Defaults to false
|
||||
# Defaults to true
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (optional) Whether to start/stop the service
|
||||
|
@ -17,7 +17,7 @@
|
|||
# Defaults to 'present'
|
||||
#
|
||||
class nova::cert(
|
||||
$enabled = false,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present'
|
||||
) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# [*enabled*]
|
||||
# (optional) Whether to enable the nova-compute service
|
||||
# Defaults to false
|
||||
# Defaults to true
|
||||
#
|
||||
# [*heal_instance_info_cache_interval*]
|
||||
# (optional) Controls how often the instance info should be updated.
|
||||
|
@ -112,7 +112,7 @@
|
|||
# { 'vendor_id':'4321','product_id':'8765','physical_network':'default' } ] "
|
||||
#
|
||||
class nova::compute (
|
||||
$enabled = false,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$vnc_enabled = true,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# [*enabled*]
|
||||
# (optional) Whether to enable the nova-conductor service
|
||||
# Defaults to false
|
||||
# Defaults to true
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (optional) Whether to start/stop the service
|
||||
|
@ -21,7 +21,7 @@
|
|||
# Defaults to undef (i.e. parameter will not be present)
|
||||
#
|
||||
class nova::conductor(
|
||||
$enabled = false,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$workers = undef,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#
|
||||
# [*enabled*]
|
||||
# (optional) Whether the nova consoleauth service will be run
|
||||
# Defaults to false
|
||||
# Defaults to true
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (optional) Whether to start/stop the service
|
||||
|
@ -20,7 +20,7 @@
|
|||
# Defaults to 'present'
|
||||
#
|
||||
class nova::consoleauth(
|
||||
$enabled = false,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present'
|
||||
) {
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
define nova::generic_service(
|
||||
$package_name,
|
||||
$service_name,
|
||||
$enabled = false,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present'
|
||||
) {
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#
|
||||
# [*enabled*]
|
||||
# (optional) Whether the network service should be enabled.
|
||||
# Defaults to false
|
||||
# Defaults to true
|
||||
#
|
||||
# [*network_manager*]
|
||||
# (optional) The type of network manager to use.
|
||||
|
@ -66,7 +66,7 @@ class nova::network(
|
|||
$num_networks = 1,
|
||||
$network_size = 255,
|
||||
$floating_range = false,
|
||||
$enabled = false,
|
||||
$enabled = true,
|
||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||
$config_overrides = {},
|
||||
$create_networks = true,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# [*enabled*]
|
||||
# (optional) Whether to enable the service
|
||||
# Defaults to false
|
||||
# Defaults to true
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (optional) Whether to start/stop the service
|
||||
|
@ -21,7 +21,7 @@
|
|||
# Defaults to '0.0.0.0'
|
||||
#
|
||||
class nova::objectstore(
|
||||
$enabled = false,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$bind_address = '0.0.0.0'
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# [*enabled*]
|
||||
# (optional) Whether to run the scheduler service
|
||||
# Defaults to false
|
||||
# Defaults to true
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (optional) Whether to start/stop the service
|
||||
|
@ -21,7 +21,7 @@
|
|||
# Defaults to 'nova.scheduler.filter_scheduler.FilterScheduler'
|
||||
#
|
||||
class nova::scheduler(
|
||||
$enabled = false,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$scheduler_driver = 'nova.scheduler.filter_scheduler.FilterScheduler',
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# [*enabled*]
|
||||
# (optional) enable spicehtml5proxy service
|
||||
# true/false
|
||||
# Defaults to true
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (optional) Whether to start/stop the service
|
||||
|
@ -29,7 +29,7 @@
|
|||
# Defaults to 'present'
|
||||
#
|
||||
class nova::spicehtml5proxy(
|
||||
$enabled = false,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$host = '0.0.0.0',
|
||||
$port = '6082',
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# [*enabled*]
|
||||
# (optional) Whether to run the vncproxy service
|
||||
# Defaults to false
|
||||
# Defaults to true
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (optional) Whether to start/stop the service
|
||||
|
@ -34,7 +34,7 @@
|
|||
# Defaults to '/vnc_auto.html'
|
||||
#
|
||||
class nova::vncproxy(
|
||||
$enabled = false,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$vncproxy_protocol = 'http',
|
||||
$host = '0.0.0.0',
|
||||
|
|
|
@ -94,26 +94,22 @@ describe 'basic nova' do
|
|||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::nova::api':
|
||||
enabled => true,
|
||||
admin_password => 'a_big_secret',
|
||||
identity_uri => 'http://127.0.0.1:35357/',
|
||||
osapi_v3 => true,
|
||||
}
|
||||
class { '::nova::cert': enabled => true }
|
||||
class { '::nova::cert': }
|
||||
class { '::nova::client': }
|
||||
class { '::nova::conductor': enabled => true }
|
||||
class { '::nova::consoleauth': enabled => true }
|
||||
class { '::nova::conductor': }
|
||||
class { '::nova::consoleauth': }
|
||||
class { '::nova::cron::archive_deleted_rows': }
|
||||
class { '::nova::compute':
|
||||
enabled => true,
|
||||
vnc_enabled => true,
|
||||
}
|
||||
class { '::nova::compute': vnc_enabled => true }
|
||||
class { '::nova::compute::libvirt':
|
||||
migration_support => true,
|
||||
vncserver_listen => '0.0.0.0',
|
||||
}
|
||||
class { '::nova::scheduler': enabled => true }
|
||||
class { '::nova::vncproxy': enabled => true }
|
||||
class { '::nova::scheduler': }
|
||||
class { '::nova::vncproxy': }
|
||||
# TODO: networking with neutron
|
||||
EOS
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@ describe 'nova::api' do
|
|||
it 'installs nova-api package and service' do
|
||||
is_expected.to contain_service('nova-api').with(
|
||||
:name => platform_params[:nova_api_service],
|
||||
:ensure => 'stopped',
|
||||
:ensure => 'running',
|
||||
:hasstatus => true,
|
||||
:enable => false
|
||||
:enable => true
|
||||
)
|
||||
is_expected.to contain_package('nova-api').with(
|
||||
:name => platform_params[:nova_api_package],
|
||||
|
@ -78,7 +78,7 @@ describe 'nova::api' do
|
|||
context 'with overridden parameters' do
|
||||
before do
|
||||
params.merge!({
|
||||
:enabled => true,
|
||||
:enabled => false,
|
||||
:ensure_package => '2012.1-2',
|
||||
:auth_host => '10.0.0.1',
|
||||
:auth_port => 1234,
|
||||
|
@ -111,9 +111,9 @@ describe 'nova::api' do
|
|||
)
|
||||
is_expected.to contain_service('nova-api').with(
|
||||
:name => platform_params[:nova_api_service],
|
||||
:ensure => 'running',
|
||||
:ensure => 'stopped',
|
||||
:hasstatus => true,
|
||||
:enable => true
|
||||
:enable => false
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ describe 'nova::compute' do
|
|||
it 'installs nova-compute package and service' do
|
||||
is_expected.to contain_service('nova-compute').with({
|
||||
:name => platform_params[:nova_compute_service],
|
||||
:ensure => 'stopped',
|
||||
:ensure => 'running',
|
||||
:hasstatus => true,
|
||||
:enable => false
|
||||
:enable => true
|
||||
})
|
||||
is_expected.to contain_package('nova-compute').with({
|
||||
:name => platform_params[:nova_compute_package],
|
||||
|
@ -47,7 +47,7 @@ describe 'nova::compute' do
|
|||
|
||||
context 'with overridden parameters' do
|
||||
let :params do
|
||||
{ :enabled => true,
|
||||
{ :enabled => false,
|
||||
:ensure_package => '2012.1-2',
|
||||
:vncproxy_host => '127.0.0.1',
|
||||
:network_device_mtu => 9999,
|
||||
|
@ -65,9 +65,9 @@ describe 'nova::compute' do
|
|||
it 'installs nova-compute package and service' do
|
||||
is_expected.to contain_service('nova-compute').with({
|
||||
:name => platform_params[:nova_compute_service],
|
||||
:ensure => 'running',
|
||||
:ensure => 'stopped',
|
||||
:hasstatus => true,
|
||||
:enable => true
|
||||
:enable => false
|
||||
})
|
||||
is_expected.to contain_package('nova-compute').with({
|
||||
:name => platform_params[:nova_compute_package],
|
||||
|
|
|
@ -6,10 +6,6 @@ describe 'nova::conductor' do
|
|||
'include nova'
|
||||
end
|
||||
|
||||
let :params do
|
||||
{ :enabled => true }
|
||||
end
|
||||
|
||||
shared_examples 'nova-conductor' do
|
||||
|
||||
|
||||
|
@ -44,8 +40,8 @@ describe 'nova::conductor' do
|
|||
end
|
||||
|
||||
context 'with overriden workers parameter' do
|
||||
before do
|
||||
params.merge!({:workers => '5' })
|
||||
let :params do
|
||||
{:workers => '5' }
|
||||
end
|
||||
it { is_expected.to contain_nova_config('conductor/workers').with_value('5') }
|
||||
end
|
||||
|
|
|
@ -34,9 +34,6 @@ describe 'nova::network' do
|
|||
) }
|
||||
|
||||
describe 'with enabled as true' do
|
||||
let :params do
|
||||
default_params.merge(:enabled => true)
|
||||
end
|
||||
it { is_expected.to contain_service('nova-network').with(
|
||||
'name' => 'nova-network',
|
||||
'ensure' => 'running',
|
||||
|
@ -45,6 +42,9 @@ describe 'nova::network' do
|
|||
)}
|
||||
end
|
||||
describe 'when enabled is set to false' do
|
||||
let :params do
|
||||
default_params.merge(:enabled => false)
|
||||
end
|
||||
it { is_expected.to contain_service('nova-network').with(
|
||||
'name' => 'nova-network',
|
||||
'ensure' => 'stopped',
|
||||
|
@ -206,9 +206,9 @@ describe 'nova::network' do
|
|||
end
|
||||
it { is_expected.to contain_service('nova-network').with(
|
||||
'name' => 'openstack-nova-network',
|
||||
'ensure' => 'stopped',
|
||||
'ensure' => 'running',
|
||||
'hasstatus' => true,
|
||||
'enable' => false
|
||||
'enable' => true
|
||||
)}
|
||||
it { is_expected.to contain_package('nova-network').with_name('openstack-nova-network') }
|
||||
end
|
||||
|
|
|
@ -6,10 +6,6 @@ describe 'nova::scheduler' do
|
|||
'include nova'
|
||||
end
|
||||
|
||||
let :params do
|
||||
{ :enabled => true }
|
||||
end
|
||||
|
||||
shared_examples 'nova-scheduler' do
|
||||
|
||||
|
||||
|
|
|
@ -6,10 +6,6 @@ describe 'nova::spicehtml5proxy' do
|
|||
'include nova'
|
||||
end
|
||||
|
||||
let :params do
|
||||
{ :enabled => true }
|
||||
end
|
||||
|
||||
shared_examples 'nova-spicehtml5proxy' do
|
||||
|
||||
it 'configures nova.conf' do
|
||||
|
|
|
@ -6,52 +6,50 @@ describe 'nova::vncproxy' do
|
|||
'include nova'
|
||||
end
|
||||
|
||||
let :params do
|
||||
{:enabled => true}
|
||||
end
|
||||
context 'with default parameters' do
|
||||
|
||||
describe 'on debian platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_package('python-numpy').with(
|
||||
:ensure => 'present',
|
||||
:name => 'python-numpy'
|
||||
)}
|
||||
|
||||
it { is_expected.to contain_nova_config('DEFAULT/novncproxy_host').with(:value => '0.0.0.0') }
|
||||
it { is_expected.to contain_nova_config('DEFAULT/novncproxy_port').with(:value => '6080') }
|
||||
it { is_expected.to contain_nova_config('DEFAULT/novncproxy_base_url').with(:value => 'http://0.0.0.0:6080/vnc_auto.html') }
|
||||
|
||||
it { is_expected.to contain_package('nova-vncproxy').with(
|
||||
:name => 'nova-novncproxy',
|
||||
:ensure => 'present'
|
||||
) }
|
||||
it { is_expected.to contain_service('nova-vncproxy').with(
|
||||
:name => 'nova-novncproxy',
|
||||
:hasstatus => true,
|
||||
:ensure => 'running'
|
||||
)}
|
||||
|
||||
describe 'with manage_service as false' do
|
||||
let :params do
|
||||
{ :enabled => true,
|
||||
:manage_service => false
|
||||
}
|
||||
describe 'on debian platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
it { is_expected.to contain_service('nova-vncproxy').without_ensure }
|
||||
end
|
||||
|
||||
describe 'with package version' do
|
||||
let :params do
|
||||
{:ensure_package => '2012.1-2'}
|
||||
end
|
||||
it { is_expected.to contain_package('nova-vncproxy').with(
|
||||
'ensure' => '2012.1-2'
|
||||
it { is_expected.to contain_package('python-numpy').with(
|
||||
:ensure => 'present',
|
||||
:name => 'python-numpy'
|
||||
)}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_nova_config('DEFAULT/novncproxy_host').with(:value => '0.0.0.0') }
|
||||
it { is_expected.to contain_nova_config('DEFAULT/novncproxy_port').with(:value => '6080') }
|
||||
it { is_expected.to contain_nova_config('DEFAULT/novncproxy_base_url').with(:value => 'http://0.0.0.0:6080/vnc_auto.html') }
|
||||
|
||||
it { is_expected.to contain_package('nova-vncproxy').with(
|
||||
:name => 'nova-novncproxy',
|
||||
:ensure => 'present'
|
||||
) }
|
||||
it { is_expected.to contain_service('nova-vncproxy').with(
|
||||
:name => 'nova-novncproxy',
|
||||
:hasstatus => true,
|
||||
:ensure => 'running'
|
||||
)}
|
||||
|
||||
describe 'with manage_service as false' do
|
||||
let :params do
|
||||
{ :enabled => true,
|
||||
:manage_service => false
|
||||
}
|
||||
end
|
||||
it { is_expected.to contain_service('nova-vncproxy').without_ensure }
|
||||
end
|
||||
|
||||
describe 'with package version' do
|
||||
let :params do
|
||||
{:ensure_package => '2012.1-2'}
|
||||
end
|
||||
it { is_expected.to contain_package('nova-vncproxy').with(
|
||||
'ensure' => '2012.1-2'
|
||||
)}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'on debian OS' do
|
||||
|
|
|
@ -9,8 +9,7 @@ describe 'nova::generic_service' do
|
|||
let :params do
|
||||
{
|
||||
:package_name => 'foo',
|
||||
:service_name => 'food',
|
||||
:enabled => true
|
||||
:service_name => 'food'
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -16,16 +16,16 @@ shared_examples 'generic nova service' do |service|
|
|||
})
|
||||
is_expected.to contain_service(service[:name]).with({
|
||||
:name => service[:service_name],
|
||||
:ensure => 'stopped',
|
||||
:ensure => 'running',
|
||||
:hasstatus => true,
|
||||
:enable => false
|
||||
:enable => true
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
context 'with overridden parameters' do
|
||||
let :params do
|
||||
{ :enabled => true,
|
||||
{ :enabled => false,
|
||||
:ensure_package => '2012.1-2' }
|
||||
end
|
||||
|
||||
|
@ -37,9 +37,9 @@ shared_examples 'generic nova service' do |service|
|
|||
})
|
||||
is_expected.to contain_service(service[:name]).with({
|
||||
:name => service[:service_name],
|
||||
:ensure => 'running',
|
||||
:ensure => 'stopped',
|
||||
:hasstatus => true,
|
||||
:enable => true
|
||||
:enable => false
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue