Merge pull request #189 from jtopjian/folsom-rebase

Changes
This commit is contained in:
Dan Bode 2012-11-06 18:58:42 -08:00
commit 31a0d77ce8
5 changed files with 32 additions and 21 deletions

View File

@ -15,6 +15,14 @@ class nova::compute::libvirt (
}
}
if $migration_support {
if $vncserver_listen != '0.0.0.0' {
fail("For migration support to work, you MUST set vncserver_listen to '0.0.0.0'")
} else {
class { 'nova::migration::libvirt': }
}
}
package { 'libvirt':
name => $::nova::params::libvirt_package_name,
ensure => present,

View File

@ -11,7 +11,8 @@ class nova::keystone::auth(
$volume_version = 'v1',
$region = 'RegionOne',
$tenant = 'services',
$email = 'nova@localhost'
$email = 'nova@localhost',
$cinder = false
) {
keystone_user { $auth_name:
@ -36,16 +37,18 @@ class nova::keystone::auth(
internal_url => "http://${internal_address}:${compute_port}/${compute_version}/%(tenant_id)s",
}
keystone_service { "${auth_name}_volume":
ensure => present,
type => 'volume',
description => 'Volume Service',
}
keystone_endpoint { "${region}/${auth_name}_volume":
ensure => present,
public_url => "http://${public_address}:${volume_port}/${volume_version}/%(tenant_id)s",
admin_url => "http://${admin_address}:${volume_port}/${volume_version}/%(tenant_id)s",
internal_url => "http://${internal_address}:${volume_port}/${volume_version}/%(tenant_id)s",
if $cinder == false {
keystone_service { "${auth_name}_volume":
ensure => present,
type => 'volume',
description => 'Volume Service',
}
keystone_endpoint { "${region}/${auth_name}_volume":
ensure => present,
public_url => "http://${public_address}:${volume_port}/${volume_version}/%(tenant_id)s",
admin_url => "http://${admin_address}:${volume_port}/${volume_version}/%(tenant_id)s",
internal_url => "http://${internal_address}:${volume_port}/${volume_version}/%(tenant_id)s",
}
}
keystone_service { "${auth_name}_ec2":

View File

@ -9,7 +9,8 @@ define nova::manage::network (
$network,
$num_networks = 1,
$network_size = 255,
$project = undef
$vlan_start = undef,
$project = undef
) {
File['/etc/nova/nova.conf'] -> Nova_network[$name]
@ -21,6 +22,7 @@ define nova::manage::network (
num_networks => $num_networks,
network_size => $network_size,
project => $project,
vlan_start => $vlan_start,
}
}

View File

@ -1,14 +1,5 @@
class nova::migration::libvirt {
define replace($file, $orig, $new) {
exec { "Replace ${orig} with ${new} in ${file}":
path => ['/bin', '/usr/bin'],
command => "perl -p -i -e 's/^${orig}\$/${new}/g' ${file}",
unless => "grep -q '^${new}$' ${file}",
notify => Service['libvirt'],
}
}
case $::lsbdistid {
'Ubuntu': {
# Ubuntu-specific, not Debian, due to upstart

View File

@ -43,6 +43,12 @@ class nova::network(
nova_config { 'floating_range': value => $floating_range }
}
if has_key($config_overrides, 'vlan_start') {
$vlan_start = $config_overrides['vlan_start']
} else {
$vlan_start = undef
}
if $install_service {
nova::generic_service { 'network':
enabled => $enabled,
@ -58,6 +64,7 @@ class nova::network(
network => $fixed_range,
num_networks => $num_networks,
network_size => $network_size,
vlan_start => $vlan_start,
}
if $floating_range {
nova::manage::floating { 'nova-vm-floating':