diff --git a/recipes/api.rb b/recipes/api.rb index ee48403..9bb7176 100644 --- a/recipes/api.rb +++ b/recipes/api.rb @@ -62,7 +62,10 @@ service_pass = get_password 'service', 'openstack-block-storage' auth_uri = auth_uri_transform(identity_endpoint.to_s, node['openstack']['block-storage']['api']['auth']['version']) -execute 'cinder-manage db sync' +execute 'cinder-manage db sync' do + user node['openstack']['block-storage']['user'] + group node['openstack']['block-storage']['group'] +end template '/etc/cinder/api-paste.ini' do source 'api-paste.ini.erb' diff --git a/spec/api_spec.rb b/spec/api_spec.rb index 792fefd..9b5739c 100644 --- a/spec/api_spec.rb +++ b/spec/api_spec.rb @@ -49,7 +49,7 @@ describe 'openstack-block-storage::api' do end it 'runs db migrations' do - expect(chef_run).to run_execute('cinder-manage db sync') + expect(chef_run).to run_execute('cinder-manage db sync').with(user: 'cinder', group: 'cinder') end describe 'api-paste.ini' do