RPC_backend / transport_url workover
- removed deprecated rabbitmq attributes - added rabbit_transport_url Change-Id: Iaf33e8f5ae97ee0c07cfccf67d32d0e05f48e5bb
This commit is contained in:
parent
0aebc9986a
commit
61fc649dd9
|
@ -7,7 +7,6 @@ default['openstack']['compute']['conf'].tap do |conf|
|
|||
conf['DEFAULT']['state_path'] = '/var/lib/nova'
|
||||
conf['DEFAULT']['compute_driver'] = 'libvirt.LibvirtDriver'
|
||||
conf['DEFAULT']['auth_version'] = node['openstack']['api']['auth']['version']
|
||||
conf['DEFAULT']['rpc_backend'] = node['openstack']['mq']['service_type']
|
||||
conf['DEFAULT']['instances_path'] = "#{node['openstack']['compute']['conf']['DEFAULT']['state_path']}/instances"
|
||||
conf['DEFAULT']['enabled_apis'] = 'osapi_compute'
|
||||
if node['openstack']['compute']['syslog']['use'] #= false
|
||||
|
|
|
@ -94,13 +94,8 @@ if node['openstack']['endpoints']['db']['enabled_slave']
|
|||
db_uri('compute_api', api_db_user, api_db_pass, true)
|
||||
end
|
||||
|
||||
if node['openstack']['compute']['conf']['DEFAULT']['rpc_backend'] == 'rabbit'
|
||||
user = node['openstack']['mq']['compute']['rabbit']['userid']
|
||||
node.default['openstack']['compute']['conf_secrets']
|
||||
.[]('oslo_messaging_rabbit')['rabbit_userid'] = user
|
||||
node.default['openstack']['compute']['conf_secrets']
|
||||
.[]('oslo_messaging_rabbit')['rabbit_password'] =
|
||||
get_password 'user', user
|
||||
if node['openstack']['mq']['service_type'] == 'rabbit'
|
||||
node.default['openstack']['compute']['conf_secrets']['DEFAULT']['transport_url'] = rabbit_transport_url 'compute'
|
||||
end
|
||||
|
||||
memcache_servers = memcached_servers.join ','
|
||||
|
|
|
@ -92,8 +92,8 @@ describe 'openstack-compute::nova-common' do
|
|||
end
|
||||
end
|
||||
|
||||
it 'has default RPC/AMQP options set' do
|
||||
[/^rpc_backend = rabbit$/].each do |line|
|
||||
it 'has default transport_url/AMQP options set' do
|
||||
[%r{^transport_url = rabbit://guest:mypass@127.0.0.1:5672$}].each do |line|
|
||||
expect(chef_run).to render_file(file.name).with_content(line)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -73,9 +73,9 @@ shared_context 'compute_stubs' do
|
|||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||
.with('service', 'rbd_block_storage')
|
||||
.and_return 'cinder-rbd-pass'
|
||||
# allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||
# .with('service', 'openstack-bare-metal')
|
||||
# .and_return 'ironic-pass'
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:rabbit_transport_url)
|
||||
.with('compute')
|
||||
.and_return('rabbit://guest:mypass@127.0.0.1:5672')
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:memcached_servers).and_return []
|
||||
allow(Chef::Application).to receive(:fatal!)
|
||||
allow(SecureRandom).to receive(:hex).and_return('ad3313264ea51d8c6a3d1c5b140b9883')
|
||||
|
|
Loading…
Reference in New Issue