Make the db_sync command different per distro

Ubunutu has packaged its own special commands to deal with
db migrations. This commit ensures that the db sync command
is per distro.
This commit is contained in:
Dan Bode 2012-04-12 15:21:59 -07:00
parent c73c4a8fcf
commit 0f751551db
2 changed files with 3 additions and 0 deletions

View File

@ -7,11 +7,13 @@ class glance::params {
$package_name = 'openstack-glance'
$api_service_name = 'openstack-glance-api'
$registry_service_name = 'openstack-glance-registry'
$db_sync_command = 'glance-manage db_sync'
}
'Debian': {
$package_name = 'glance'
$api_service_name = 'glance-api'
$registry_service_name = 'glance-registry'
$db_sync_command = 'glance-manage version_control 0 && glance-manage db_sync'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian")

View File

@ -34,6 +34,7 @@ class glance::registry(
}
exec { 'glance-manage db_sync':
command => $::glance::params::db_sync_command,
path => '/usr/bin',
refreshonly => true,
logoutput => on_failure,