Nova module update for Liberty

New merge commit from master branch was done
for nova module, and also some additional patches
were added to fix nova providers:
https://review.openstack.org/#/c/229895/
https://review.openstack.org/#/c/226862/
https://review.openstack.org/#/c/229548/

Fix .fixtures.yml for OpenStack module
(according to Puppetfile changes)

Fix network creation for nova network deployment
(Nova network is going to be removed, so
this part will be removed later as well)

Fix noop test according nova module update

Partial implements: blueprint fuel-puppet-librarian

Change-Id: I5cd3fa0eab862d066d6e9d9765df8d59b783ab6a
This commit is contained in:
iberezovskiy 2015-10-12 17:20:19 +03:00 committed by Denis Egorenko
parent a94bddc9ae
commit a3728bd789
7 changed files with 61 additions and 28 deletions

View File

@ -109,7 +109,7 @@ mod 'neutron',
# Pull in puppet-nova
mod 'nova',
:git => 'https://review.fuel-infra.org/p/puppet-modules/puppet-nova.git',
:ref => '7.0.0-mos-rc1'
:ref => '7.0.0-mos-rc2'
# Pull in puppet-heat
mod 'heat',

View File

@ -17,28 +17,28 @@ fixtures:
branch: 'mos-8.0'
'keystone':
repo: 'https://review.fuel-infra.org/puppet-modules/puppet-keystone.git'
branch: '7.0.0-mos-rc2'
branch: '7.0.0-mos-rc3'
'neutron':
repo: 'https://review.fuel-infra.org/puppet-modules/puppet-neutron.git'
branch: '7.0.0-mos-rc1'
branch: '7.0.0-mos-rc4'
'nova':
repo: 'https://review.fuel-infra.org/puppet-modules/puppet-nova.git'
branch: '7.0.0-mos-rc1'
branch: '7.0.0-mos-rc2'
'heat':
repo: 'https://review.fuel-infra.org/puppet-modules/puppet-heat.git'
branch: '7.0.0-mos-rc1'
branch: '7.0.0-mos-rc2'
'glance':
repo: 'https://review.fuel-infra.org/puppet-modules/puppet-glance.git'
branch: '7.0.0-mos-rc1'
branch: '7.0.0-mos-rc2'
'ceilometer':
repo: 'https://review.fuel-infra.org/puppet-modules/puppet-ceilometer.git'
branch: '7.0.0-mos-rc1'
branch: '7.0.0-mos-rc2'
'cinder':
repo: 'https://review.fuel-infra.org/puppet-modules/openstack-cinder.git'
branch: '7.0.0-mos-rc1'
branch: '7.0.0-mos-rc2'
'sahara':
repo: 'https://review.fuel-infra.org/puppet-modules/puppet-sahara.git'
branch: '7.0.0-mos-rc1'
branch: '7.0.0-mos-rc2'
'murano':
repo: 'https://review.fuel-infra.org/puppet-modules/puppet-murano.git'
branch: '7.0.0-mos-rc1'

View File

@ -276,10 +276,6 @@ class openstack::nova::controller (
'DEFAULT/fping_path': value => $fping_path,
}
nova_config {
'cinder/catalog_info': value => 'volume:cinder:internalURL',
}
class {'nova::quota':
quota_instances => pick($nova_hash['quota_instances'], 100),
quota_cores => pick($nova_hash['quota_cores'], 100),
@ -343,6 +339,7 @@ class openstack::nova::controller (
ec2_workers => $service_workers,
metadata_workers => $service_workers,
keystone_ec2_url => "http://${keystone_host}:5000/v2.0/ec2tokens",
cinder_catalog_info => 'volume:cinder:internalURL',
}
# From legacy init.pp

View File

@ -48,11 +48,20 @@ if $use_neutron {
$fixed_range = hiera('fixed_network_range', undef)
$network_manager = hiera('network_manager', undef)
$network_config = hiera('network_config', { })
$create_networks = true
$num_networks = hiera('num_networks', undef)
$network_size = hiera('network_size', undef)
$nameservers = hiera('dns_nameservers', undef)
$enable_nova_net = false
#NOTE(degorenko): lp/1501767
if $nameservers {
if count($nameservers) >= 2 {
$dns_opts = "--dns1 ${nameservers[0]} --dns2 ${nameservers[1]}"
} else {
$dns_opts = "--dns1 ${nameservers[0]}"
}
} else {
$dns_opts = ""
}
class { 'nova::network' :
ensure_package => $ensure_package,
@ -62,13 +71,22 @@ if $use_neutron {
floating_range => false,
network_manager => $network_manager,
config_overrides => $network_config,
create_networks => $create_networks,
create_networks => false, # lp/1501767
num_networks => $num_networks,
network_size => $network_size,
dns1 => $nameservers[0],
dns2 => $nameservers[1],
enabled => $enable_nova_net,
install_service => false, # bacause controller
install_service => false, # because controller
}
#NOTE(degorenko): lp/1501767
$primary_controller = hiera('primary_controller')
if $primary_controller {
exec { 'create_private_nova_network':
path => '/usr/bin',
command => "nova-manage network create novanetwork ${fixed_range} ${num_networks} ${network_size} ${dns_opts}",
}
}
# NOTE(aglarendil): lp/1381164

View File

@ -137,8 +137,6 @@ if $queue_provider == 'rabbitmq' {
class { 'nova::rabbitmq':
enabled => $enabled,
# Do not install rabbitmq from nova classes
rabbitmq_class => false,
userid => $rabbit_hash['user'],
password => $rabbit_hash['password'],
require => Class['::rabbitmq'],

View File

@ -41,7 +41,8 @@ describe manifest do
keystone_ec2_url = "http://#{keystone_host}:5000/v2.0/ec2tokens"
it 'should declare class nova::api with keystone_ec2_url' do
should contain_class('nova::api').with(
'keystone_ec2_url' => keystone_ec2_url,
'keystone_ec2_url' => keystone_ec2_url,
'cinder_catalog_info' => 'volume:cinder:internalURL',
)
end

View File

@ -54,14 +54,25 @@ describe manifest do
elsif !Noop.hiera('use_neutron') && Noop.hiera('role') =~ /controller/
context 'setup Nova on controller for using nova-network' do
private_interface = Noop.hiera('private_int')
public_interface = Noop.hiera('public_int')
fixed_range = Noop.hiera('fixed_network_range')
network_manager = Noop.hiera('network_manager')
network_config = Noop.hiera('network_config', {})
num_networks = Noop.hiera('num_networks')
network_size = Noop.hiera('network_size')
nameservers = Noop.hiera_array('dns_nameservers', [])
private_interface = Noop.hiera('private_int')
public_interface = Noop.hiera('public_int')
fixed_range = Noop.hiera('fixed_network_range')
network_manager = Noop.hiera('network_manager')
network_config = Noop.hiera('network_config', {})
num_networks = Noop.hiera('num_networks')
network_size = Noop.hiera('network_size')
nameservers = Noop.hiera_array('dns_nameservers', [])
primary_controller = Noop.hiera('primary_controller', false)
if nameservers
if nameservers.size >= 2
dns_opts = "--dns1 #{nameservers[0]} --dns2 #{nameservers[1]}"
else
dns_opts = "--dns1 #{nameservers[0]}"
end
else
dns_opts = ""
end
it { should contain_nova_config('DEFAULT/force_snat_range').with(
'value' => '0.0.0.0/0'
@ -73,7 +84,7 @@ describe manifest do
'enabled' => false
)}
it { should contain_class('nova::network').with(
'create_networks' => true
'create_networks' => false
)}
it { should contain_class('nova::network').with(
'floating_range' => false
@ -105,6 +116,14 @@ describe manifest do
it { should contain_class('nova::network').with(
'dns2' => nameservers[1]
)}
if primary_controller
it 'should create private nova network' do
should contain_exec('create_private_nova_network').with(
'command' => "nova-manage network create novanetwork #{fixed_range} #{num_networks} #{network_size} #{dns_opts}"
)
end
end
end
end
end