From 990d850248eb1ffe99877ec1cbb2649589d23165 Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Fri, 24 May 2013 14:12:59 -0700 Subject: [PATCH] set purging to false setting purging to true is not a great user experience. B/c every single default parameter set by the openstack packages are not managed by puppet, setting purging to true is likely to remove some default parameters which is not an intuitive default behavior. Change-Id: Ie8b0b0a8dbcfe68f8eb307940b587ba94ff3c7c0 --- manifests/all.pp | 4 ++-- manifests/compute.pp | 6 ++++-- manifests/controller.pp | 7 ++++++- spec/classes/openstack_all_spec.rb | 4 ++++ spec/classes/openstack_compute_spec.rb | 1 + spec/classes/openstack_controller_spec.rb | 1 + 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/manifests/all.pp b/manifests/all.pp index 8484fce..66f2a0e 100644 --- a/manifests/all.pp +++ b/manifests/all.pp @@ -31,7 +31,7 @@ # [glance_user_password] The password of the glance service user. Optional. Defaults to 'glance_pass'. # [secret_key] The secret key for horizon. Optional. Defaults to 'dummy_secret_key'. # [verbose] If the services should log verbosely. Optional. Defaults to false. -# [purge_nova_config] Whether unmanaged nova.conf entries should be purged. Optional. Defaults to true. +# [purge_nova_config] Whether unmanaged nova.conf entries should be purged. Optional. Defaults to false. # [libvirt_type] The virualization type being controlled by libvirt. Optional. Defaults to 'kvm'. # [volume_group] The name of the volume group to use for nova volume allocation. Optional. Defaults to 'cinder-volumes'. # [horizon] (bool) is horizon installed. Defaults to: true @@ -96,7 +96,7 @@ class openstack::all ( # Nova $nova_db_user = 'nova', $nova_db_dbname = 'nova', - $purge_nova_config = true, + $purge_nova_config = false, # Network $network_manager = 'nova.network.manager.FlatDHCPManager', $fixed_range = '10.0.0.0/24', diff --git a/manifests/compute.pp b/manifests/compute.pp index 1fea68f..8923b6e 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -3,7 +3,9 @@ # # Manifest to install/configure nova-compute # -# === Parameters +# [purge_nova_config] +# Whether unmanaged nova.conf entries should be purged. +# (optional) Defaults to false. # # === Examples # @@ -45,7 +47,7 @@ class openstack::compute ( # Nova $nova_admin_tenant_name = 'services', $nova_admin_user = 'nova', - $purge_nova_config = true, + $purge_nova_config = false, $libvirt_vif_driver = 'nova.virt.libvirt.vif.LibvirtGenericVIFDriver', # Rabbit $rabbit_host = '127.0.0.1', diff --git a/manifests/controller.pp b/manifests/controller.pp index 5e8eb40..a968e31 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -18,6 +18,11 @@ # [glance_user_password] Glance service user password. # [nova_db_password] Nova DB password. # [nova_user_password] Nova service password. +# +# [purge_nova_config] +# Whether unmanaged nova.conf entries should be purged. +# (optional) Defaults to false. +# # [rabbit_password] Rabbit password. # [rabbit_user] Rabbit User. Optional. Defaults to openstack. # [rabbit_virtual_host] Rabbit virtual host path for Nova. Defaults to '/'. @@ -123,7 +128,7 @@ class openstack::controller ( $nova_admin_user = 'nova', $nova_db_user = 'nova', $nova_db_dbname = 'nova', - $purge_nova_config = true, + $purge_nova_config = false, $enabled_apis = 'ec2,osapi_compute,metadata', # Nova Networking $public_interface = false, diff --git a/spec/classes/openstack_all_spec.rb b/spec/classes/openstack_all_spec.rb index 4862bdc..a28ce25 100644 --- a/spec/classes/openstack_all_spec.rb +++ b/spec/classes/openstack_all_spec.rb @@ -87,4 +87,8 @@ describe 'openstack::all' do end it { should contain_nova_config('DEFAULT/auto_assign_floating_ip').with(:value => 'True')} end + + context 'nova' do + it { should_not contain_resources('nova_config').with_purge(true) } + end end diff --git a/spec/classes/openstack_compute_spec.rb b/spec/classes/openstack_compute_spec.rb index f6c5edf..046404f 100644 --- a/spec/classes/openstack_compute_spec.rb +++ b/spec/classes/openstack_compute_spec.rb @@ -39,6 +39,7 @@ describe 'openstack::compute' do :glance_api_servers => false, :verbose => false ) + should_not contain_resources('nova_config').with_purge(true) should contain_class('nova::compute').with( :enabled => true, :vnc_enabled => true, diff --git a/spec/classes/openstack_controller_spec.rb b/spec/classes/openstack_controller_spec.rb index e6db45d..e1a4917 100644 --- a/spec/classes/openstack_controller_spec.rb +++ b/spec/classes/openstack_controller_spec.rb @@ -344,6 +344,7 @@ describe 'openstack::controller' do context 'with default params' do it 'should contain enabled nova services' do + should_not contain_resources('nova_config').with_purge(true) should contain_class('nova::rabbitmq').with( :userid => 'openstack', :password => 'rabbit_pw',