diff options
Diffstat (limited to 'manifests/profile/base/gnocchi')
-rw-r--r-- | manifests/profile/base/gnocchi/api.pp | 26 | ||||
-rw-r--r-- | manifests/profile/base/gnocchi/metricd.pp | 2 | ||||
-rw-r--r-- | manifests/profile/base/gnocchi/statsd.pp | 2 |
3 files changed, 15 insertions, 15 deletions
diff --git a/manifests/profile/base/gnocchi/api.pp b/manifests/profile/base/gnocchi/api.pp index a4e9a30..3953f04 100644 --- a/manifests/profile/base/gnocchi/api.pp +++ b/manifests/profile/base/gnocchi/api.pp @@ -68,7 +68,7 @@ class tripleo::profile::base::gnocchi::api ( $gnocchi_network = hiera('gnocchi_api_network', undef), $gnocchi_redis_password = hiera('gnocchi_redis_password'), $redis_vip = hiera('redis_vip'), - $step = hiera('step'), + $step = Integer(hiera('step')), ) { if $::hostname == downcase($bootstrap_node) { $sync_db = true @@ -89,12 +89,11 @@ class tripleo::profile::base::gnocchi::api ( $tls_keyfile = undef } - if $step >= 3 and $sync_db { + if $step >= 4 and $sync_db { include ::gnocchi::db::sync } - if $step >= 3 { - include ::gnocchi::api + if $step >= 4 or ($step >= 3 and $sync_db) { include ::apache::mod::ssl class { '::gnocchi::wsgi::apache': ssl_cert => $tls_certfile, @@ -107,19 +106,20 @@ class tripleo::profile::base::gnocchi::api ( coordination_url => join(['redis://:', $gnocchi_redis_password, '@', normalize_ip_for_uri($redis_vip), ':6379/']), } case $gnocchi_backend { - 'swift': { include ::gnocchi::storage::swift } + 'swift': { + include ::gnocchi::storage::swift + if $sync_db { + include ::swift::deps + # Ensure we have swift proxy available before running gnocchi-upgrade + # as storage is initialized at this point. + Anchor<| title == 'swift::service::end' |> ~> Class['Gnocchi::db::sync'] + } + } 'file': { include ::gnocchi::storage::file } 'rbd': { include ::gnocchi::storage::ceph } default: { fail('Unrecognized gnocchi_backend parameter.') } } + include ::gnocchi::api } - # Re-run gnochci upgrade with storage as swift/ceph should be up at this - # stage. - if $step >= 5 and $sync_db { - exec {'run gnocchi upgrade with storage': - command => 'gnocchi-upgrade --config-file=/etc/gnocchi/gnocchi.conf', - path => ['/usr/bin', '/usr/sbin'], - } - } } diff --git a/manifests/profile/base/gnocchi/metricd.pp b/manifests/profile/base/gnocchi/metricd.pp index f6f80cd..c585e57 100644 --- a/manifests/profile/base/gnocchi/metricd.pp +++ b/manifests/profile/base/gnocchi/metricd.pp @@ -24,7 +24,7 @@ # Defaults to hiera('step') # class tripleo::profile::base::gnocchi::metricd ( - $step = hiera('step'), + $step = Integer(hiera('step')), ) { include ::tripleo::profile::base::gnocchi diff --git a/manifests/profile/base/gnocchi/statsd.pp b/manifests/profile/base/gnocchi/statsd.pp index 7c98a0a..184ff7b 100644 --- a/manifests/profile/base/gnocchi/statsd.pp +++ b/manifests/profile/base/gnocchi/statsd.pp @@ -24,7 +24,7 @@ # Defaults to hiera('step') # class tripleo::profile::base::gnocchi::statsd ( - $step = hiera('step'), + $step = Integer(hiera('step')), ) { include ::tripleo::profile::base::gnocchi |