Merge "gnocchi/ceilometer upgrade workflow fix"

This commit is contained in:
Zuul 2018-01-04 19:13:51 +00:00 committed by Gerrit Code Review
commit 149a15ef84
2 changed files with 21 additions and 8 deletions

View File

@ -38,8 +38,6 @@ class tripleo::profile::base::ceilometer::upgrade (
$sync_db = false
}
# Run ceilometer-upgrade in step 5 so gnocchi resource types
# are created safely.
if $step >= 5 and $sync_db {
exec {'ceilometer-db-upgrade':
command => 'ceilometer-upgrade',
@ -53,5 +51,12 @@ class tripleo::profile::base::ceilometer::upgrade (
try_sleep => 5,
tries => 10
}
# NOTE(sileht): Ensure we run before ceilometer-agent-notification is
# started and after gnocchi-api is running
include ::gnocchi::deps
Anchor['gnocchi::service::end']
~> Exec['ceilometer-db-upgrade']
~> Anchor['ceilometer::service::begin']
}
}

View File

@ -94,20 +94,28 @@ class tripleo::profile::base::gnocchi::api (
$tls_keyfile = undef
}
if $step >= 4 and $sync_db {
include ::gnocchi::db::sync
}
if $step >= 4 or ($step >= 3 and $sync_db) {
if $sync_db {
# NOTE(sileht): We upgrade only the database on step 3.
# the storage will be updated on step4 when swift is ready
if ($step == 3 and $gnocchi_backend == 'swift') {
$db_sync_extra_opts = '--skip-storage --skip-incoming'
} else {
$db_sync_extra_opts = undef
}
class { '::gnocchi::db::sync':
extra_opts => $db_sync_extra_opts,
}
}
include ::gnocchi::api
include ::tripleo::profile::base::apache
class { '::gnocchi::wsgi::apache':
ssl_cert => $tls_certfile,
ssl_key => $tls_keyfile,
}
}
if $step >= 4 {
class { '::gnocchi::storage':
coordination_url => join(['redis://:', $gnocchi_redis_password, '@', normalize_ip_for_uri($redis_vip), ':6379/']),
}