Add configuration for glance-api used by cinder.

Adding configuration for glance-api used by cinder.  This is necessary
in multi-node installations to allow nova boot from an image based
volume to work properly.  Glance-api for cinder is currently being set
to 127.0.0.1 by default.

Closes-Bug: #1286088
Change-Id: I35f789e07ad317e7c8952beb4192c1f4159383d4
This commit is contained in:
Min Pae
2014-02-28 03:37:05 -08:00
parent 0cbddbcea0
commit d4b5fae753
6 changed files with 23 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ class openstack::cinder::all(
$rabbit_hosts = undef, $rabbit_hosts = undef,
$rabbit_port = '5672', $rabbit_port = '5672',
$rabbit_virtual_host = '/', $rabbit_virtual_host = '/',
$glance_api_servers = '127.0.0.1:9292',
# Database. Currently mysql is the only option. # Database. Currently mysql is the only option.
$db_type = 'mysql', $db_type = 'mysql',
$db_user = 'cinder', $db_user = 'cinder',
@@ -113,4 +114,8 @@ class openstack::cinder::all(
} }
} }
} }
class { '::cinder::glance':
glance_api_servers => $glance_api_servers
}
} }

View File

@@ -15,6 +15,7 @@ class openstack::cinder::controller(
$rabbit_hosts = false, $rabbit_hosts = false,
$rabbit_port = '5672', $rabbit_port = '5672',
$rabbit_virtual_host = '/', $rabbit_virtual_host = '/',
$glance_api_servers = '127.0.0.1:9292',
# Database. Currently mysql is the only option. # Database. Currently mysql is the only option.
$db_type = 'mysql', $db_type = 'mysql',
$db_user = 'cinder', $db_user = 'cinder',
@@ -80,4 +81,7 @@ class openstack::cinder::controller(
enabled => $scheduler_enabled, enabled => $scheduler_enabled,
} }
class { '::cinder::glance':
glance_api_servers => $glance_api_servers
}
} }

View File

@@ -6,6 +6,7 @@ class openstack::cinder::storage(
$rabbit_hosts = false, $rabbit_hosts = false,
$rabbit_port = '5672', $rabbit_port = '5672',
$rabbit_virtual_host = '/', $rabbit_virtual_host = '/',
$glance_api_servers = '127.0.0.1:9292',
$package_ensure = 'present', $package_ensure = 'present',
$api_paste_config = '/etc/cinder/api-paste.ini', $api_paste_config = '/etc/cinder/api-paste.ini',
$volume_package_ensure = 'present', $volume_package_ensure = 'present',
@@ -70,4 +71,8 @@ class openstack::cinder::storage(
warning("Unsupported volume driver: ${volume_driver}, make sure you are configuring this yourself") warning("Unsupported volume driver: ${volume_driver}, make sure you are configuring this yourself")
} }
} }
class { '::cinder::glance':
glance_api_servers => $glance_api_servers
}
} }

View File

@@ -57,6 +57,9 @@ describe 'openstack::cinder::all' do
:iscsi_ip_address => '127.0.0.1', :iscsi_ip_address => '127.0.0.1',
:volume_group => 'cinder-volumes' :volume_group => 'cinder-volumes'
) )
should contain_class('cinder::glance').with(
:glance_api_servers => '127.0.0.1:9292'
)
should_not contain_class('cinder::setup_test_volume') should_not contain_class('cinder::setup_test_volume')
end end

View File

@@ -49,6 +49,9 @@ describe 'openstack::cinder::controller' do
:package_ensure => 'present', :package_ensure => 'present',
:enabled => true :enabled => true
) )
should contain_class('cinder::glance').with(
:glance_api_servers => '127.0.0.1:9292'
)
end end
describe 'with custom syslog settings' do describe 'with custom syslog settings' do

View File

@@ -37,6 +37,9 @@ describe 'openstack::cinder::storage' do
:iscsi_ip_address => '127.0.0.1', :iscsi_ip_address => '127.0.0.1',
:volume_group => 'cinder-volumes' :volume_group => 'cinder-volumes'
) )
should contain_class('cinder::glance').with(
:glance_api_servers => '127.0.0.1:9292'
)
should_not contain_class('cinder::setup_test_volume') should_not contain_class('cinder::setup_test_volume')
end end