diff --git a/README.md b/README.md index bd9c767..a0c0f80 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ Cinder attributes * `openstack["block-storage"]["service_tenant_name"]` - name of tenant to use for the cinder service account in keystone * `openstack["block-storage"]["service_user"]` - cinder service user in keystone * `openstack["block-storage"]["service_role"]` - role for the cinder service user in keystone +* `openstack["block-storage"]["notification_driver"]` - Set the notification driver to be used (default to cinder.openstack.common.notifier.rpc_notifier) * `openstack["block-storage"]["syslog"]["use"]` * `openstack["block-storage"]["syslog"]["facility"]` * `openstack["block-storage"]["syslog"]["config_facility"]` diff --git a/attributes/default.rb b/attributes/default.rb index 423faa0..9ea9c08 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -39,6 +39,8 @@ default['openstack']['block-storage']['debug'] = 'False' # Default lock_path default['openstack']['block-storage']['lock_path'] = '/var/lock/cinder' +# Default notification_driver +default['openstack']['block-storage']['notification_driver'] = 'cinder.openstack.common.notifier.rpc_notifier' # Availability zone/region for the OpenStack Block-Storage service default['openstack']['block-storage']['region'] = 'RegionOne' default['openstack']['block-storage']['scheduler_role'] = 'os-block-storage-scheduler' diff --git a/spec/cinder_common_spec.rb b/spec/cinder_common_spec.rb index 82f41f4..73dd631 100644 --- a/spec/cinder_common_spec.rb +++ b/spec/cinder_common_spec.rb @@ -152,6 +152,7 @@ describe 'openstack-block-storage::cinder-common' do before do @file = @chef_run.template '/etc/cinder/cinder.conf' @chef_run.node.set['openstack']['mq']['block-storage']['service_type'] = 'qpid' + @chef_run.node.set['openstack']['block-storage']['notification_driver'] = 'cinder.test_driver' @chef_run.converge 'openstack-block-storage::cinder-common' end @@ -210,6 +211,10 @@ describe 'openstack-block-storage::cinder-common' do it 'has qpid_tcp_nodelay' do expect(@chef_run).to render_file(@file.name).with_content('qpid_tcp_nodelay=true') end + + it 'has notification_driver' do + expect(@chef_run).to render_file(@file.name).with_content('notification_driver=cinder.test_driver') + end end end diff --git a/templates/default/cinder.conf.erb b/templates/default/cinder.conf.erb index ebefc05..8036ad3 100644 --- a/templates/default/cinder.conf.erb +++ b/templates/default/cinder.conf.erb @@ -12,7 +12,7 @@ verbose=<%= node["openstack"]["block-storage"]["verbose"] %> # lock_path lock_path=<%= node["openstack"]["block-storage"]["lock_path"] %> -notification_driver=cinder.openstack.common.notifier.rpc_notifier +notification_driver=<%= node["openstack"]["block-storage"]["notification_driver"] %> # log_config= #### (StrOpt) If this option is specified, the logging configuration file