Command parameter to sync the correct Database

Without the correct --config-file parameter the glance-manage db_sync
command does not sync the correct database. The default without any
configuration is to use an SQLite Database at /var/lib/glance/glancedb.
This is most probably not what's intended.

Change-Id: I61f4e47ad082b48ee83b17df70e9856f640083b1
(cherry picked from commit c51c22770d)
This commit is contained in:
Gaudenz Steinlin 2015-02-23 13:06:35 +01:00 committed by Colleen Murphy
parent 57685754d3
commit dfa549f040
2 changed files with 3 additions and 2 deletions

View File

@ -14,14 +14,14 @@ class glance::params {
$registry_package_name = 'openstack-glance'
$api_service_name = 'openstack-glance-api'
$registry_service_name = 'openstack-glance-registry'
$db_sync_command = 'glance-manage db_sync'
$db_sync_command = 'glance-manage --config-file=/etc/glance/glance-registry.conf db_sync'
}
'Debian': {
$api_package_name = 'glance-api'
$registry_package_name = 'glance-registry'
$api_service_name = 'glance-api'
$registry_service_name = 'glance-registry'
$db_sync_command = 'glance-manage db_sync'
$db_sync_command = 'glance-manage --config-file=/etc/glance/glance-registry.conf db_sync'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian")

View File

@ -77,6 +77,7 @@ describe 'glance::registry' do
if param_hash[:enabled]
should contain_exec('glance-manage db_sync').with(
'path' => '/usr/bin',
'command' => 'glance-manage --config-file=/etc/glance/glance-registry.conf db_sync',
'refreshonly' => true,
'logoutput' => 'on_failure',
'subscribe' => ['Package[glance-registry]', 'File[/etc/glance/glance-registry.conf]'],