Update deprecated neutron_*/glance_*/cinder_* options in nova.conf
In openstack juno release, neutron_*, glance_* and cinder_* configurations in [DEFAULT] section have been deprecated by a new section [neutron]/[glance]/[cinder] https://review.openstack.org/#/c/97461/ https://review.openstack.org/#/c/102212/ https://review.openstack.org/#/c/100567/ https://review.openstack.org/#/c/100800/ In Kilo, these deprecated options have been completely removed https://review.openstack.org/#/c/132885/ https://review.openstack.org/#/c/132900/ https://review.openstack.org/#/c/132887/ If early Kilo adopters use openstack-compute cookbook for deployment, nova-compute won't work any more. In order to provide support for early Kilo adopters update the nova.conf template in Juno to reflect these changes. Change-Id: I4965927c66118aad46a736ea84e437de9b60fee4 Closes-Bug: #1339695
This commit is contained in:
parent
e19da7ee1e
commit
f3952ed4e4
|
@ -21,6 +21,7 @@ This file is used to list changes made in each version of cookbook-openstack-com
|
||||||
* Add cinder_catalog_info
|
* Add cinder_catalog_info
|
||||||
* Updated the nova-networking to start metadata-api
|
* Updated the nova-networking to start metadata-api
|
||||||
* Allow rabbit ssl in the ha case
|
* Allow rabbit ssl in the ha case
|
||||||
|
* Move deprecated neutron_*/glance_*/cinder_* configurations to [neutron]/[glance]/[cinder] sections in nova.conf
|
||||||
|
|
||||||
## 9.3.1
|
## 9.3.1
|
||||||
* Move auth configuration from api-paste.ini to nova.conf
|
* Move auth configuration from api-paste.ini to nova.conf
|
||||||
|
|
|
@ -40,22 +40,28 @@ describe 'openstack-compute::network' do
|
||||||
|
|
||||||
it 'includes neutron section defaults' do
|
it 'includes neutron section defaults' do
|
||||||
[
|
[
|
||||||
%r{^neutron_url=http://127.0.0.1:9696$},
|
%r{^url=http://127.0.0.1:9696$},
|
||||||
|
/^auth_strategy=keystone$/,
|
||||||
|
/^admin_tenant_name=service$/,
|
||||||
|
/^admin_username=neutron$/,
|
||||||
|
/^admin_password=neutron-pass$/,
|
||||||
|
%r{^admin_auth_url=http://127.0.0.1:5000/v2.0$},
|
||||||
|
/^url_timeout=30$/,
|
||||||
|
/^region_name=$/,
|
||||||
|
/^ovs_bridge=br-int$/,
|
||||||
|
/^extension_sync_interval=600$/,
|
||||||
|
/^ca_certificates_file=$/,
|
||||||
|
/^service_metadata_proxy=true$/,
|
||||||
|
/^metadata_proxy_shared_secret=metadata-secret$/
|
||||||
|
].each do |line|
|
||||||
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('neutron', line)
|
||||||
|
end
|
||||||
|
|
||||||
|
[
|
||||||
/^network_api_class=nova.network.neutronv2.api.API$/,
|
/^network_api_class=nova.network.neutronv2.api.API$/,
|
||||||
/^neutron_auth_strategy=keystone$/,
|
|
||||||
/^neutron_admin_tenant_name=service$/,
|
|
||||||
/^neutron_admin_username=neutron$/,
|
|
||||||
/^neutron_admin_password=neutron-pass$/,
|
|
||||||
%r{^neutron_admin_auth_url=http://127.0.0.1:5000/v2.0$},
|
|
||||||
/^neutron_url_timeout=30$/,
|
|
||||||
/^neutron_region_name=$/,
|
|
||||||
/^neutron_ovs_bridge=br-int$/,
|
|
||||||
/^neutron_extension_sync_interval=600$/,
|
|
||||||
/^neutron_ca_certificates_file=$/,
|
|
||||||
/^linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver$/,
|
/^linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver$/,
|
||||||
/^security_group_api=neutron$/,
|
/^security_group_api=neutron$/,
|
||||||
/^service_neutron_metadata_proxy=true$/,
|
|
||||||
/^neutron_metadata_proxy_shared_secret=metadata-secret$/,
|
|
||||||
/^default_floating_pool=public$/,
|
/^default_floating_pool=public$/,
|
||||||
/^dns_server=8.8.8.8$/
|
/^dns_server=8.8.8.8$/
|
||||||
].each do |line|
|
].each do |line|
|
||||||
|
|
|
@ -70,12 +70,14 @@ describe 'openstack-compute::nova-common' do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has no rng_dev_path by default' do
|
it 'has no rng_dev_path by default' do
|
||||||
expect(chef_run).not_to render_file(file.name).with_content(/^rng_dev_path=/)
|
expect(chef_run).not_to render_config_file(file.name)\
|
||||||
|
.with_section_content('libvirt', /^rng_dev_path=/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has rng_dev_path config if provided from attribute' do
|
it 'has rng_dev_path config if provided from attribute' do
|
||||||
node.set['openstack']['compute']['libvirt']['rng_dev_path'] = '/dev/random'
|
node.set['openstack']['compute']['libvirt']['rng_dev_path'] = '/dev/random'
|
||||||
expect(chef_run).to render_file(file.name).with_content(%r{^rng_dev_path=/dev/random$})
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('libvirt', %r{^rng_dev_path=/dev/random$})
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has dnsmasq_config_file' do
|
it 'has dnsmasq_config_file' do
|
||||||
|
@ -230,45 +232,77 @@ describe 'openstack-compute::nova-common' do
|
||||||
'admin_password = nova-pass',
|
'admin_password = nova-pass',
|
||||||
'signing_dir = /var/cache/nova/api'
|
'signing_dir = /var/cache/nova/api'
|
||||||
].each do |line|
|
].each do |line|
|
||||||
expect(chef_run).to render_file(file.name).with_content(
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
/^#{Regexp.quote(line)}$/)
|
.with_section_content('keystone_authtoken', /^#{Regexp.quote(line)}$/)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'uses default values for attributes' do
|
it 'uses default values for attributes' do
|
||||||
expect(chef_run).not_to render_file(file.name).with_content(
|
[
|
||||||
/^memcached_servers =/)
|
/^memcached_servers =/,
|
||||||
expect(chef_run).not_to render_file(file.name).with_content(
|
/^memcache_security_strategy =/,
|
||||||
/^memcache_security_strategy =/)
|
/^memcache_secret_key =/,
|
||||||
expect(chef_run).not_to render_file(file.name).with_content(
|
/^cafile =/
|
||||||
/^memcache_secret_key =/)
|
].each do |line|
|
||||||
expect(chef_run).not_to render_file(file.name).with_content(
|
expect(chef_run).not_to render_config_file(file.name)\
|
||||||
/^cafile =/)
|
.with_section_content('keystone_authtoken', line)
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^ca_file=$/)
|
end
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^cert_file=$/)
|
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^key_file=$/)
|
[
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^cinder_ca_certificates_file=$/)
|
/^hash_algorithms = md5$/,
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^cinder_api_insecure=false/)
|
/^insecure = false$/
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^cinder_catalog_info=volumev2:cinderv2:publicURL$/)
|
].each do |line|
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^hash_algorithms = md5$/)
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^insecure = false$/)
|
.with_section_content('keystone_authtoken', line)
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^glance_api_insecure=false$/)
|
end
|
||||||
expect(chef_run).to render_file(file.name).with_content(%r{^glance_api_servers=http://127.0.0.1:9292$})
|
|
||||||
|
[
|
||||||
|
/^ca_file=$/,
|
||||||
|
/^cert_file=$/,
|
||||||
|
/^key_file=$/
|
||||||
|
].each do |line|
|
||||||
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('ssl', line)
|
||||||
|
end
|
||||||
|
|
||||||
|
[
|
||||||
|
/^ca_certificates_file=$/,
|
||||||
|
/^api_insecure=false/,
|
||||||
|
/^catalog_info=volumev2:cinderv2:publicURL$/
|
||||||
|
].each do |line|
|
||||||
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('cinder', line)
|
||||||
|
end
|
||||||
|
|
||||||
|
[
|
||||||
|
/^api_insecure=false$/,
|
||||||
|
%r{^api_servers=http://127.0.0.1:9292$}
|
||||||
|
].each do |line|
|
||||||
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('glance', line)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets service_type to neutron' do
|
it 'sets service_type to neutron' do
|
||||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^neutron_api_insecure=false$/)
|
[
|
||||||
expect(chef_run).to render_file(file.name).with_content(%r{^neutron_url=http://127.0.0.1:9696$})
|
/^api_insecure=false$/,
|
||||||
|
%r{^url=http://127.0.0.1:9696$}
|
||||||
|
].each do |line|
|
||||||
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('neutron', line)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets service_type and insecure and scheme for neutron' do
|
it 'sets service_type and insecure and scheme for neutron' do
|
||||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||||
node.set['openstack']['compute']['network']['neutron']['api_insecure'] = true
|
node.set['openstack']['compute']['network']['neutron']['api_insecure'] = true
|
||||||
node.set['openstack']['endpoints']['network-api']['scheme'] = 'https'
|
node.set['openstack']['endpoints']['network-api']['scheme'] = 'https'
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^neutron_api_insecure=true$/)
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
expect(chef_run).to render_file(file.name).with_content(%r{^neutron_url=https://127.0.0.1:9696$})
|
.with_section_content('neutron', /^api_insecure=true$/)
|
||||||
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('neutron', %r{^url=https://127.0.0.1:9696$})
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets scheme and insecure for glance' do
|
it 'sets scheme and insecure for glance' do
|
||||||
|
@ -277,50 +311,74 @@ describe 'openstack-compute::nova-common' do
|
||||||
node.set['openstack']['compute']['image']['ssl']['ca_file'] = 'dir/to/path'
|
node.set['openstack']['compute']['image']['ssl']['ca_file'] = 'dir/to/path'
|
||||||
node.set['openstack']['compute']['image']['ssl']['cert_file'] = 'dir/to/path2'
|
node.set['openstack']['compute']['image']['ssl']['cert_file'] = 'dir/to/path2'
|
||||||
node.set['openstack']['compute']['image']['ssl']['key_file'] = 'dir/to/path3'
|
node.set['openstack']['compute']['image']['ssl']['key_file'] = 'dir/to/path3'
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^glance_api_insecure=true$/)
|
|
||||||
expect(chef_run).to render_file(file.name).with_content(%r{^glance_api_servers=https://127.0.0.1:9292$})
|
[
|
||||||
expect(chef_run).to render_file(file.name).with_content(%r{^ca_file=dir/to/path$})
|
/^api_insecure=true$/,
|
||||||
expect(chef_run).to render_file(file.name).with_content(%r{^cert_file=dir/to/path2$})
|
%r{^api_servers=https://127.0.0.1:9292$}
|
||||||
expect(chef_run).to render_file(file.name).with_content(%r{^key_file=dir/to/path3$})
|
].each do |line|
|
||||||
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('glance', line)
|
||||||
|
end
|
||||||
|
|
||||||
|
[
|
||||||
|
%r{^ca_file=dir/to/path$},
|
||||||
|
%r{^cert_file=dir/to/path2$},
|
||||||
|
%r{^key_file=dir/to/path3$}
|
||||||
|
].each do |line|
|
||||||
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('ssl', line)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets cinder options' do
|
it 'sets cinder options' do
|
||||||
node.set['openstack']['compute']['block-storage']['cinder_ca_certificates_file'] = 'dir/to/path'
|
node.set['openstack']['compute']['block-storage']['cinder_ca_certificates_file'] = 'dir/to/path'
|
||||||
node.set['openstack']['compute']['block-storage']['cinder_api_insecure'] = true
|
node.set['openstack']['compute']['block-storage']['cinder_api_insecure'] = true
|
||||||
node.set['openstack']['compute']['block-storage']['cinder_catalog_info'] = 'volume:cinder:publicURL'
|
node.set['openstack']['compute']['block-storage']['cinder_catalog_info'] = 'volume:cinder:publicURL'
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^cinder_api_insecure=true$/)
|
|
||||||
expect(chef_run).to render_file(file.name).with_content(%r{^cinder_ca_certificates_file=dir/to/path$})
|
[
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^cinder_catalog_info=volume:cinder:publicURL$/)
|
/^api_insecure=true$/,
|
||||||
|
%r{^ca_certificates_file=dir/to/path$},
|
||||||
|
/^catalog_info=volume:cinder:publicURL$/
|
||||||
|
].each do |line|
|
||||||
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('cinder', line)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets memcached server(s)' do
|
it 'sets memcached server(s)' do
|
||||||
node.set['openstack']['compute']['api']['auth']['memcached_servers'] = 'localhost:11211'
|
node.set['openstack']['compute']['api']['auth']['memcached_servers'] = 'localhost:11211'
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^memcached_servers = localhost:11211$/)
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('keystone_authtoken', /^memcached_servers = localhost:11211$/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets memcache security strategy' do
|
it 'sets memcache security strategy' do
|
||||||
node.set['openstack']['compute']['api']['auth']['memcache_security_strategy'] = 'MAC'
|
node.set['openstack']['compute']['api']['auth']['memcache_security_strategy'] = 'MAC'
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^memcache_security_strategy = MAC$/)
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('keystone_authtoken', /^memcache_security_strategy = MAC$/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets memcache secret key' do
|
it 'sets memcache secret key' do
|
||||||
node.set['openstack']['compute']['api']['auth']['memcache_secret_key'] = '0123456789ABCDEF'
|
node.set['openstack']['compute']['api']['auth']['memcache_secret_key'] = '0123456789ABCDEF'
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^memcache_secret_key = 0123456789ABCDEF$/)
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('keystone_authtoken', /^memcache_secret_key = 0123456789ABCDEF$/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets cafile' do
|
it 'sets cafile' do
|
||||||
node.set['openstack']['compute']['api']['auth']['cafile'] = 'dir/to/path'
|
node.set['openstack']['compute']['api']['auth']['cafile'] = 'dir/to/path'
|
||||||
expect(chef_run).to render_file(file.name).with_content(%r{^cafile = dir/to/path$})
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('keystone_authtoken', %r{^cafile = dir/to/path$})
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets token hash algorithms' do
|
it 'sets token hash algorithms' do
|
||||||
node.set['openstack']['compute']['api']['auth']['hash_algorithms'] = 'sha2'
|
node.set['openstack']['compute']['api']['auth']['hash_algorithms'] = 'sha2'
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^hash_algorithms = sha2$/)
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('keystone_authtoken', /^hash_algorithms = sha2$/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets insecure' do
|
it 'sets insecure' do
|
||||||
node.set['openstack']['compute']['api']['auth']['insecure'] = true
|
node.set['openstack']['compute']['api']['auth']['insecure'] = true
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^insecure = true$/)
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('keystone_authtoken', /^insecure = true$/)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'rabbit mq backend' do
|
context 'rabbit mq backend' do
|
||||||
|
@ -463,14 +521,14 @@ describe 'openstack-compute::nova-common' do
|
||||||
|
|
||||||
it 'has a os_region_name setting' do
|
it 'has a os_region_name setting' do
|
||||||
chef_run.node.set['openstack']['node'] = 'RegionOne'
|
chef_run.node.set['openstack']['node'] = 'RegionOne'
|
||||||
expect(chef_run).to render_file(file.name).with_content(
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
/^os_region_name=RegionOne$/)
|
.with_section_content('cinder', /^os_region_name=RegionOne$/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has a disk_cachemodes setting' do
|
it 'has a disk_cachemodes setting' do
|
||||||
chef_run.node.set['openstack']['compute']['config']['disk_cachemodes'] = 'disk:writethrough'
|
chef_run.node.set['openstack']['compute']['config']['disk_cachemodes'] = 'disk:writethrough'
|
||||||
expect(chef_run).to render_file(file.name).with_content(
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
/^disk_cachemodes=disk:writethrough$/)
|
.with_section_content('libvirt', /^disk_cachemodes=disk:writethrough$/)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'metering' do
|
context 'metering' do
|
||||||
|
@ -511,38 +569,41 @@ describe 'openstack-compute::nova-common' do
|
||||||
|
|
||||||
context 'libvirt configuration' do
|
context 'libvirt configuration' do
|
||||||
it 'has default libvirt_* options set' do
|
it 'has default libvirt_* options set' do
|
||||||
[/^use_virtio_for_bridges=true$/,
|
[
|
||||||
/^images_type=default$/,
|
/^use_virtio_for_bridges=true$/,
|
||||||
/^inject_key=true$/,
|
/^images_type=default$/,
|
||||||
/^inject_password=false$/,
|
/^inject_key=true$/,
|
||||||
/^inject_partition=-2$/,
|
/^inject_password=false$/,
|
||||||
/^live_migration_bandwidth=0$/,
|
/^inject_partition=-2$/,
|
||||||
/^live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER$/,
|
/^live_migration_bandwidth=0$/,
|
||||||
/^block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER, VIR_MIGRATE_NON_SHARED_INC$/,
|
/^live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER$/,
|
||||||
%r{live_migration_uri=qemu\+tcp://%s/system$}].each do |line|
|
/^block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER, VIR_MIGRATE_NON_SHARED_INC$/,
|
||||||
expect(chef_run).to render_file(file.name).with_content(line)
|
%r{live_migration_uri=qemu\+tcp://%s/system$}
|
||||||
end
|
].each do |line|
|
||||||
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('libvirt', line)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it "the libvirt cpu_mode is none when virt_type is 'qemu'" do
|
it "the libvirt cpu_mode is none when virt_type is 'qemu'" do
|
||||||
node.set['openstack']['compute']['libvirt']['virt_type'] = 'qemu'
|
node.set['openstack']['compute']['libvirt']['virt_type'] = 'qemu'
|
||||||
|
|
||||||
expect(chef_run).to render_file(file.name).with_content(
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
'cpu_mode=none')
|
.with_section_content('libvirt', /^cpu_mode=none$/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has a configurable inject_key setting' do
|
it 'has a configurable inject_key setting' do
|
||||||
node.set['openstack']['compute']['libvirt']['libvirt_inject_key'] = false
|
node.set['openstack']['compute']['libvirt']['libvirt_inject_key'] = false
|
||||||
|
|
||||||
expect(chef_run).to render_file(file.name).with_content(
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
/^inject_key=false$/)
|
.with_section_content('libvirt', /^inject_key=false$/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has a configurable inject_password setting' do
|
it 'has a configurable inject_password setting' do
|
||||||
node.set['openstack']['compute']['libvirt']['libvirt_inject_password'] = true
|
node.set['openstack']['compute']['libvirt']['libvirt_inject_password'] = true
|
||||||
|
|
||||||
expect(chef_run).to render_file(file.name).with_content(
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
/^inject_password=true$/)
|
.with_section_content('libvirt', /^inject_password=true$/)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -569,16 +630,19 @@ describe 'openstack-compute::nova-common' do
|
||||||
/^maximum_objects = 100$/,
|
/^maximum_objects = 100$/,
|
||||||
/^integration_bridge = br-int$/
|
/^integration_bridge = br-int$/
|
||||||
].each do |line|
|
].each do |line|
|
||||||
expect(chef_run).to render_file(file.name).with_content(line)
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('vmware', line)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has no datastore_regex line' do
|
it 'has no datastore_regex line' do
|
||||||
expect(chef_run).not_to render_file(file.name).with_content('datastore_regex = ')
|
expect(chef_run).not_to render_config_file(file.name)\
|
||||||
|
.with_section_content('vmware', 'datastore_regex = ')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has no wsdl_location line' do
|
it 'has no wsdl_location line' do
|
||||||
expect(chef_run).not_to render_file(file.name).with_content('wsdl_location = ')
|
expect(chef_run).not_to render_config_file(file.name)\
|
||||||
|
.with_section_content('vmware', 'wsdl_location = ')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -593,16 +657,20 @@ describe 'openstack-compute::nova-common' do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has multiple cluster name lines' do
|
it 'has multiple cluster name lines' do
|
||||||
expect(chef_run).to render_file(file.name).with_content('cluster_name = cluster1')
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
expect(chef_run).to render_file(file.name).with_content('cluster_name = cluster2')
|
.with_section_content('vmware', 'cluster_name = cluster1')
|
||||||
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('vmware', 'cluster_name = cluster2')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has datastore_regex line' do
|
it 'has datastore_regex line' do
|
||||||
expect(chef_run).to render_file(file.name).with_content('datastore_regex = *.')
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('vmware', 'datastore_regex = *.')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has wsdl_location line' do
|
it 'has wsdl_location line' do
|
||||||
expect(chef_run).to render_file(file.name).with_content('wsdl_location = http://127.0.0.1/')
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('vmware', 'wsdl_location = http://127.0.0.1/')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -656,7 +724,8 @@ describe 'openstack-compute::nova-common' do
|
||||||
/^rbd_user=cinder$/,
|
/^rbd_user=cinder$/,
|
||||||
/^rbd_secret_uuid=00000000-0000-0000-0000-000000000000$/
|
/^rbd_secret_uuid=00000000-0000-0000-0000-000000000000$/
|
||||||
].each do |line|
|
].each do |line|
|
||||||
expect(chef_run).to render_file(file.name).with_content(line)
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('libvirt', line)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -674,7 +743,8 @@ describe 'openstack-compute::nova-common' do
|
||||||
/^images_rbd_pool=myrbd$/,
|
/^images_rbd_pool=myrbd$/,
|
||||||
%r{^images_rbd_ceph_conf=/etc/myceph/ceph.conf$}
|
%r{^images_rbd_ceph_conf=/etc/myceph/ceph.conf$}
|
||||||
].each do |line|
|
].each do |line|
|
||||||
expect(chef_run).to render_file(file.name).with_content(line)
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('libvirt', line)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -692,7 +762,8 @@ describe 'openstack-compute::nova-common' do
|
||||||
/^images_volume_group=instances$/,
|
/^images_volume_group=instances$/,
|
||||||
/^sparse_logical_volumes=false$/
|
/^sparse_logical_volumes=false$/
|
||||||
].each do |line|
|
].each do |line|
|
||||||
expect(chef_run).to render_file(file.name).with_content(line)
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('libvirt', line)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -709,7 +780,8 @@ describe 'openstack-compute::nova-common' do
|
||||||
/^images_volume_group=instances$/,
|
/^images_volume_group=instances$/,
|
||||||
/^sparse_logical_volumes=true$/
|
/^sparse_logical_volumes=true$/
|
||||||
].each do |line|
|
].each do |line|
|
||||||
expect(chef_run).to render_file(file.name).with_content(line)
|
expect(chef_run).to render_config_file(file.name)\
|
||||||
|
.with_section_content('libvirt', line)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -91,31 +91,10 @@ default_schedule_zone=<%= node["openstack"]["compute"]["config"]["default_schedu
|
||||||
|
|
||||||
when "neutron" -%>
|
when "neutron" -%>
|
||||||
|
|
||||||
# N.B. due to https://bugs.launchpad.net/nova/+bug/1206330
|
|
||||||
# we override the endpoint scheme below, ignore the port
|
|
||||||
# and essentially force http
|
|
||||||
<% if @network_endpoint.port == 443 -%>
|
|
||||||
neutron_url=http://<%= @network_endpoint.host %>:80
|
|
||||||
<% else -%>
|
|
||||||
neutron_url=<%= @network_endpoint.scheme %>://<%= @network_endpoint.host %>:<%= @network_endpoint.port %>
|
|
||||||
<% end -%>
|
|
||||||
neutron_api_insecure=<%= node['openstack']['compute']['network']['neutron']['api_insecure'] %>
|
|
||||||
network_api_class=<%= node["openstack"]["compute"]["network"]["neutron"]["network_api_class"] %>
|
network_api_class=<%= node["openstack"]["compute"]["network"]["neutron"]["network_api_class"] %>
|
||||||
neutron_auth_strategy=<%= node["openstack"]["compute"]["network"]["neutron"]["auth_strategy"] %>
|
|
||||||
neutron_admin_tenant_name=<%= node["openstack"]["compute"]["network"]["neutron"]["admin_tenant_name"] %>
|
|
||||||
neutron_admin_username=<%= node["openstack"]["compute"]["network"]["neutron"]["admin_username"] %>
|
|
||||||
neutron_admin_password=<%= @neutron_admin_password %>
|
|
||||||
neutron_admin_auth_url=<%= @identity_endpoint.to_s %>
|
|
||||||
neutron_url_timeout=<%= node["openstack"]["compute"]["network"]["neutron"]["url_timeout"] %>
|
|
||||||
neutron_region_name=<%= node["openstack"]["compute"]["network"]["neutron"]["region_name"] %>
|
|
||||||
neutron_ovs_bridge=<%= node["openstack"]["compute"]["network"]["neutron"]["ovs_bridge"] %>
|
|
||||||
neutron_extension_sync_interval=<%= node["openstack"]["compute"]["network"]["neutron"]["extension_sync_interval"] %>
|
|
||||||
neutron_ca_certificates_file=<%= node["openstack"]["compute"]["network"]["neutron"]["ca_certificates_file"] %>
|
|
||||||
linuxnet_interface_driver=<%= node["openstack"]["compute"]["network"]["neutron"]["linuxnet_interface_driver"] %>
|
linuxnet_interface_driver=<%= node["openstack"]["compute"]["network"]["neutron"]["linuxnet_interface_driver"] %>
|
||||||
firewall_driver = nova.virt.firewall.NoopFirewallDriver
|
firewall_driver = nova.virt.firewall.NoopFirewallDriver
|
||||||
security_group_api=<%= node["openstack"]["compute"]["network"]["neutron"]["security_group_api"] %>
|
security_group_api=<%= node["openstack"]["compute"]["network"]["neutron"]["security_group_api"] %>
|
||||||
service_neutron_metadata_proxy=<%= node["openstack"]["compute"]["network"]["neutron"]["service_neutron_metadata_proxy"] %>
|
|
||||||
neutron_metadata_proxy_shared_secret=<%= @neutron_metadata_proxy_shared_secret %>
|
|
||||||
default_floating_pool=<%= node["openstack"]["compute"]["network"]["neutron"]["public_network_name"] %>
|
default_floating_pool=<%= node["openstack"]["compute"]["network"]["neutron"]["public_network_name"] %>
|
||||||
dns_server=<%= node["openstack"]["compute"]["network"]["neutron"]["dns_server"] %>
|
dns_server=<%= node["openstack"]["compute"]["network"]["neutron"]["dns_server"] %>
|
||||||
|
|
||||||
|
@ -137,18 +116,6 @@ use_ipv6=<%= node["openstack"]["compute"]["network"]["use_ipv6"] %>
|
||||||
|
|
||||||
##### GLANCE #####
|
##### GLANCE #####
|
||||||
image_service=nova.image.glance.GlanceImageService
|
image_service=nova.image.glance.GlanceImageService
|
||||||
glance_api_servers=<%= @glance_api_scheme %>://<%= @glance_api_ipaddress %>:<%= @glance_api_port %>
|
|
||||||
glance_api_insecure=<%= node['openstack']['compute']['image']['glance_api_insecure'] %>
|
|
||||||
|
|
||||||
##### Cinder #####
|
|
||||||
# Location of ca certificates file to use for cinder client requests
|
|
||||||
cinder_ca_certificates_file=<%= node['openstack']['compute']['block-storage']['cinder_ca_certificates_file'] %>
|
|
||||||
|
|
||||||
# Allow to perform insecure SSL requests to cinder
|
|
||||||
cinder_api_insecure=<%= node['openstack']['compute']['block-storage']['cinder_api_insecure'] %>
|
|
||||||
|
|
||||||
# Info to match when looking for cinder in the service catalog
|
|
||||||
cinder_catalog_info=<%= node['openstack']['compute']['block-storage']['cinder_catalog_info'] %>
|
|
||||||
|
|
||||||
##### COMPUTE #####
|
##### COMPUTE #####
|
||||||
compute_driver=<%= node["openstack"]["compute"]["driver"] %>
|
compute_driver=<%= node["openstack"]["compute"]["driver"] %>
|
||||||
|
@ -343,8 +310,6 @@ compute_monitors=<%= node["openstack"]["compute"]["config"]["compute_monitors"].
|
||||||
# iscsi target user-land tool to use
|
# iscsi target user-land tool to use
|
||||||
iscsi_helper=<%= @iscsi_helper %>
|
iscsi_helper=<%= @iscsi_helper %>
|
||||||
volume_api_class=<%= node["openstack"]["compute"]["config"]["volume_api_class"] %>
|
volume_api_class=<%= node["openstack"]["compute"]["config"]["volume_api_class"] %>
|
||||||
# Region name of this node (string value)
|
|
||||||
os_region_name=<%= node['openstack']['region'] %>
|
|
||||||
|
|
||||||
# Override the default dnsmasq settings with this file (String value)
|
# Override the default dnsmasq settings with this file (String value)
|
||||||
dnsmasq_config_file=<%= node['openstack']['compute']['dnsmasq_config_file'] %>
|
dnsmasq_config_file=<%= node['openstack']['compute']['dnsmasq_config_file'] %>
|
||||||
|
@ -664,3 +629,47 @@ memcache_secret_key = <%= node['openstack']['compute']['api']['auth']['memcache_
|
||||||
<% end %>
|
<% end %>
|
||||||
hash_algorithms = <%= node['openstack']['compute']['api']['auth']['hash_algorithms'] %>
|
hash_algorithms = <%= node['openstack']['compute']['api']['auth']['hash_algorithms'] %>
|
||||||
insecure = <%= node['openstack']['compute']['api']['auth']['insecure'] %>
|
insecure = <%= node['openstack']['compute']['api']['auth']['insecure'] %>
|
||||||
|
|
||||||
|
<% if node['openstack']['compute']['network']['service_type'] == 'neutron' %>
|
||||||
|
|
||||||
|
[neutron]
|
||||||
|
# N.B. due to https://bugs.launchpad.net/nova/+bug/1206330
|
||||||
|
# we override the endpoint scheme below, ignore the port
|
||||||
|
# and essentially force http
|
||||||
|
<% if @network_endpoint.port == 443 -%>
|
||||||
|
url=http://<%= @network_endpoint.host %>:80
|
||||||
|
<% else -%>
|
||||||
|
url=<%= @network_endpoint.scheme %>://<%= @network_endpoint.host %>:<%= @network_endpoint.port %>
|
||||||
|
<% end -%>
|
||||||
|
api_insecure=<%= node['openstack']['compute']['network']['neutron']['api_insecure'] %>
|
||||||
|
auth_strategy=<%= node["openstack"]["compute"]["network"]["neutron"]["auth_strategy"] %>
|
||||||
|
admin_tenant_name=<%= node["openstack"]["compute"]["network"]["neutron"]["admin_tenant_name"] %>
|
||||||
|
admin_username=<%= node["openstack"]["compute"]["network"]["neutron"]["admin_username"] %>
|
||||||
|
admin_password=<%= @neutron_admin_password %>
|
||||||
|
admin_auth_url=<%= @identity_endpoint.to_s %>
|
||||||
|
url_timeout=<%= node["openstack"]["compute"]["network"]["neutron"]["url_timeout"] %>
|
||||||
|
region_name=<%= node["openstack"]["compute"]["network"]["neutron"]["region_name"] %>
|
||||||
|
ovs_bridge=<%= node["openstack"]["compute"]["network"]["neutron"]["ovs_bridge"] %>
|
||||||
|
extension_sync_interval=<%= node["openstack"]["compute"]["network"]["neutron"]["extension_sync_interval"] %>
|
||||||
|
ca_certificates_file=<%= node["openstack"]["compute"]["network"]["neutron"]["ca_certificates_file"] %>
|
||||||
|
service_metadata_proxy=<%= node["openstack"]["compute"]["network"]["neutron"]["service_neutron_metadata_proxy"] %>
|
||||||
|
metadata_proxy_shared_secret=<%= @neutron_metadata_proxy_shared_secret %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
[glance]
|
||||||
|
api_servers=<%= @glance_api_scheme %>://<%= @glance_api_ipaddress %>:<%= @glance_api_port %>
|
||||||
|
api_insecure=<%= node['openstack']['compute']['image']['glance_api_insecure'] %>
|
||||||
|
|
||||||
|
[cinder]
|
||||||
|
# Location of ca certificates file to use for cinder client requests
|
||||||
|
ca_certificates_file=<%= node['openstack']['compute']['block-storage']['cinder_ca_certificates_file'] %>
|
||||||
|
|
||||||
|
# Allow to perform insecure SSL requests to cinder
|
||||||
|
api_insecure=<%= node['openstack']['compute']['block-storage']['cinder_api_insecure'] %>
|
||||||
|
|
||||||
|
# Info to match when looking for cinder in the service catalog
|
||||||
|
catalog_info=<%= node['openstack']['compute']['block-storage']['cinder_catalog_info'] %>
|
||||||
|
|
||||||
|
# Region name of this node (string value)
|
||||||
|
os_region_name=<%= node['openstack']['region'] %>
|
||||||
|
|
Loading…
Reference in New Issue