Browse Source

cleanup attribute leftovers that are not used anymore

* removed all unused attributes
* removed vmware specific configuration option that can be set in a
wrapper cookbook (and was not maintained for quite some time)
* removed caseswitch for nova user and group since we currently only
support debian and rhel
* moved all libvirtd related config options to specific attribute file
in preparation for further refactoring

Change-Id: I42a0bbcd03a570b9d6d24ba32ed2cafacc33ec76
changes/12/561612/1
Jan Klare 1 year ago
parent
commit
ad88dc2a78
No account linked to committer's email address
4 changed files with 20 additions and 129 deletions
  1. 3
    93
      attributes/default.rb
  2. 16
    0
      attributes/libvirtd_conf.rb
  3. 1
    7
      recipes/nova-common.rb
  4. 0
    29
      spec/nova-common_spec.rb

+ 3
- 93
attributes/default.rb View File

@@ -12,34 +12,20 @@ default['openstack']['compute']['custom_template_banner'] = '
12 12
 # Any changes will be overwritten
13 13
 '
14 14
 
15
-# The name of the Chef role that knows about the message queue server
16
-# that Nova uses
17
-default['openstack']['compute']['rabbit_server_chef_role'] = 'os-ops-messaging'
18
-
19 15
 # Set dbsync command timeout value
20 16
 default['openstack']['compute']['dbsync_timeout'] = 3600
21 17
 
22
-# The name of the Chef role that sets up the Keystone Service API
23
-default['openstack']['compute']['identity_service_chef_role'] = 'os-identity'
24
-
25 18
 # Disallow non-encrypted connections
26 19
 default['openstack']['compute']['service_role'] = 'admin'
27 20
 
28
-case node['platform_family']
29
-when 'rhel', 'debian'
30
-  default['openstack']['compute']['user'] = 'nova'
31
-  default['openstack']['compute']['group'] = 'nova'
32
-end
21
+# Used to set correct permissions for directories and files
22
+default['openstack']['compute']['user'] = 'nova'
23
+default['openstack']['compute']['group'] = 'nova'
33 24
 
34 25
 # Logging stuff
35
-
36 26
 default['openstack']['compute']['syslog']['facility'] = 'LOG_LOCAL1'
37 27
 default['openstack']['compute']['syslog']['config_facility'] = 'local1'
38 28
 
39
-default['openstack']['compute']['region'] = node['openstack']['region']
40
-
41
-default['openstack']['compute']['floating_cmd'] = '/usr/local/bin/add_floaters.py'
42
-
43 29
 # rootwrap.conf
44 30
 default['openstack']['compute']['rootwrap']['filters_path'] = '/etc/nova/rootwrap.d,/usr/share/nova/rootwrap'
45 31
 default['openstack']['compute']['rootwrap']['exec_dirs'] = '/sbin,/usr/sbin,/bin,/usr/bin'
@@ -47,75 +33,6 @@ default['openstack']['compute']['rootwrap']['use_syslog'] = 'False'
47 33
 default['openstack']['compute']['rootwrap']['syslog_log_facility'] = 'syslog'
48 34
 default['openstack']['compute']['rootwrap']['syslog_log_level'] = 'ERROR'
49 35
 
50
-default['openstack']['compute']['driver'] = 'libvirt.LibvirtDriver'
51
-
52
-# libvirtd_opts used in template for /etc/default/libvirt-bin
53
-default['openstack']['compute']['libvirt']['libvirtd_opts'] = '-l'
54
-
55
-default['openstack']['compute']['libvirt']['auth_tcp'] = 'none'
56
-# libvirt.max_clients (default: 20)
57
-default['openstack']['compute']['libvirt']['max_clients'] = 20
58
-# libvirt.max_workers (default: 20)
59
-default['openstack']['compute']['libvirt']['max_workers'] = 20
60
-# libvirt.max_requests (default: 20)
61
-default['openstack']['compute']['libvirt']['max_requests'] = 20
62
-# libvirt.max_client_requests (default: 5)
63
-default['openstack']['compute']['libvirt']['max_client_requests'] = 5
64
-default['openstack']['compute']['libvirt']['group'] = 'libvirt'
65
-default['openstack']['compute']['libvirt']['unix_sock_rw_perms'] = '0770'
66
-default['openstack']['compute']['libvirt']['libvirt_inject_key'] = true
67
-default['openstack']['compute']['libvirt']['volume_backend'] = nil
68
-
69
-# Base URL that will be presented to users in links
70
-# to the OpenStack Compute API
71
-default['openstack']['compute']['config']['osapi_compute_link_prefix'] = nil
72
-# Base URL that will be presented to users in links
73
-# to glance resources
74
-default['openstack']['compute']['config']['osapi_glance_link_prefix'] = nil
75
-default['openstack']['compute']['config']['cpu_allocation_ratio'] = 16.0
76
-
77
-# `start` will cause nova-compute to error out if a VM is already running, where
78
-# `resume` checks to see if it is running first.
79
-# requires https://review.openstack.org/#/c/8423/
80
-default['openstack']['compute']['config']['resume_guests_state_on_host_boot'] = true
81
-
82
-default['openstack']['compute']['ratelimit']['settings'] = {
83
-  'generic-post-limit' => { 'verb' => 'POST', 'uri' => '*', 'regex' => '.*', 'limit' => '10', 'interval' => 'MINUTE' },
84
-  'create-servers-limit' => { 'verb' => 'POST', 'uri' => '*/servers', 'regex' => '^/servers', 'limit' => '50', 'interval' => 'DAY' },
85
-  'generic-put-limit' => { 'verb' => 'PUT', 'uri' => '*', 'regex' => '.*', 'limit' => '10', 'interval' => 'MINUTE' },
86
-  'changes-since-limit' => { 'verb' => 'GET', 'uri' => '*changes-since*', 'regex' => '.*changes-since.*', 'limit' => '3', 'interval' => 'MINUTE' },
87
-  'generic-delete-limit' => { 'verb' => 'DELETE', 'uri' => '*', 'regex' => '.*', 'limit' => '100', 'interval' => 'MINUTE' },
88
-}
89
-
90
-# Metering settings
91
-default['openstack']['compute']['metering'] = false ####
92
-
93
-# Notification settings
94
-default['openstack']['compute']['config']['notification_topics'] = ['notifications']
95
-
96
-if node['openstack']['compute']['metering']
97
-  default['openstack']['compute']['config']['notification_drivers'] = ['nova.openstack.common.notifier.rpc_notifier', 'ceilometer.compute.nova_notifier']
98
-  default['openstack']['compute']['config']['instance_usage_audit'] = 'True'
99
-  default['openstack']['compute']['config']['instance_usage_audit_period'] = 'hour'
100
-  default['openstack']['compute']['config']['notify_on_state_change'] = 'vm_and_task_state'
101
-else
102
-  default['openstack']['compute']['config']['notification_drivers'] = []
103
-  default['openstack']['compute']['config']['instance_usage_audit'] = 'False'
104
-  default['openstack']['compute']['config']['instance_usage_audit_period'] = 'month'
105
-  default['openstack']['compute']['config']['notify_on_state_change'] = ''
106
-end
107
-
108
-# Monitor settings
109
-default['openstack']['compute']['config']['compute_available_monitors'] = ['nova.compute.monitors.all_monitors']
110
-
111
-# Keystone settings
112
-default['openstack']['compute']['api']['auth_strategy'] = 'keystone'
113
-
114
-default['openstack']['compute']['api']['auth']['version'] = node['openstack']['api']['auth']['version']
115
-
116
-# A PEM encoded Certificate Authority to use when verifying HTTPs connections.
117
-default['openstack']['compute']['api']['auth']['cafile'] = nil
118
-
119 36
 # Placement API settings
120 37
 default['openstack']['placement']['ssl']['enabled'] = false
121 38
 default['openstack']['placement']['ssl']['certfile'] = ''
@@ -202,13 +119,6 @@ end
202 119
 # Array of options for `api-paste.ini` (e.g. ['option1=value1', ...])
203 120
 default['openstack']['compute']['misc_paste'] = nil
204 121
 
205
-# NOTE: The metadata api service is enabled via including it's recipe
206
-# NOTE: api-metadata.  By default the api-metadata recipe is included in
207
-# NOTE: the os-compute-api role which is included in the
208
-# NOTE: os-compute-single-controller role.
209
-
210
-# For true case, this logic allows the following ironic-related attribtes to be overwritten automatically.
211
-
212 122
 # ****************** OpenStack Compute Endpoints ******************************
213 123
 
214 124
 # The OpenStack Compute (Nova) XVPvnc endpoint

+ 16
- 0
attributes/libvirtd_conf.rb View File

@@ -0,0 +1,16 @@
1
+# libvirtd_opts used in template for /etc/default/libvirt-bin
2
+default['openstack']['compute']['libvirt']['libvirtd_opts'] = '-l'
3
+
4
+default['openstack']['compute']['libvirt']['auth_tcp'] = 'none'
5
+# libvirt.max_clients (default: 20)
6
+default['openstack']['compute']['libvirt']['max_clients'] = 20
7
+# libvirt.max_workers (default: 20)
8
+default['openstack']['compute']['libvirt']['max_workers'] = 20
9
+# libvirt.max_requests (default: 20)
10
+default['openstack']['compute']['libvirt']['max_requests'] = 20
11
+# libvirt.max_client_requests (default: 5)
12
+default['openstack']['compute']['libvirt']['max_client_requests'] = 5
13
+default['openstack']['compute']['libvirt']['group'] = 'libvirt'
14
+default['openstack']['compute']['libvirt']['unix_sock_rw_perms'] = '0770'
15
+default['openstack']['compute']['libvirt']['libvirt_inject_key'] = true
16
+default['openstack']['compute']['libvirt']['volume_backend'] = nil

+ 1
- 7
recipes/nova-common.rb View File

@@ -144,13 +144,7 @@ node.default['openstack']['compute']['conf_secrets']
144 144
 .[]('neutron')['metadata_proxy_shared_secret'] =
145 145
   get_password 'token', 'neutron_metadata_secret'
146 146
 
147
-if node['openstack']['compute']['driver'].split('.').first == 'vmwareapi'
148
-  node.default['openstack']['compute']['conf_secrets']
149
-    .[]('vmware')['host_password'] =
150
-    get_password 'token', 'openstack_vmware_secret_name'
151
-end
152
-
153
-auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['compute']['api']['auth']['version']
147
+auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version']
154 148
 node.default['openstack']['compute']['conf_secrets']
155 149
   .[]('keystone_authtoken')['password'] =
156 150
   get_password 'service', 'openstack-compute'

+ 0
- 29
spec/nova-common_spec.rb View File

@@ -232,35 +232,6 @@ describe 'openstack-compute::nova-common' do
232 232
           .with_section_content('cinder', /^os_region_name = RegionOne$/)
233 233
       end
234 234
 
235
-      context 'vmware' do
236
-        before do
237
-          # README(galstrom21): There is a order of operations issue here
238
-          #   if you use node.set, these tests will fail.
239
-          node.override['openstack']['compute']['driver'] = 'vmwareapi.VMwareVCDriver'
240
-          # NB(srenatus) this is only one option, the other one is
241
-          #   'vmwareapi.VMwareESXDriver' (see templates/default/nova.conf.erb)
242
-        end
243
-
244
-        it 'has vmware config options set' do
245
-          [
246
-            /^host_password = vmware_secret_name$/,
247
-          ].each do |line|
248
-            expect(chef_run).to render_config_file(file.name)\
249
-              .with_section_content('vmware', line)
250
-          end
251
-        end
252
-
253
-        it 'has no datastore_regex line' do
254
-          expect(chef_run).not_to render_config_file(file.name)\
255
-            .with_section_content('vmware', 'datastore_regex = ')
256
-        end
257
-
258
-        it 'has no wsdl_location line' do
259
-          expect(chef_run).not_to render_config_file(file.name)\
260
-            .with_section_content('vmware', 'wsdl_location = ')
261
-        end
262
-      end
263
-
264 235
       it 'has no auto_assign_floating_ip' do
265 236
         expect(chef_run).not_to render_file(file.name).with_content(
266 237
           'auto_assign_floating_ip=false'

Loading…
Cancel
Save