aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base
diff options
context:
space:
mode:
authorPradeep Kilambi <pkilambi@redhat.com>2017-05-25 18:12:50 -0400
committerPradeep Kilambi <pkilambi@redhat.com>2017-06-21 09:06:07 -0400
commitbcdea36c1857dc34b035fbe5ba57d5171f3df293 (patch)
tree4ee76c3cb1be7c9ee57828f569f1b9236d19f191 /manifests/profile/base
parent3a1074fb980987faafb45dd24f09237990f1e575 (diff)
Move gnocchi upgrade and api to step 4
gnocchi upgrade requires storage sacks to be initialized. This means we need to ensure the storage backends are up before running the upgrade and starting the api. Lets move the api to step 4 so we can ensure other dependencies are in place. Co-Authored-By: Juan Antonio Osorio Robles <jaosorior@redhat.com> Depends-On: Ibfa9fb39f60c1e4a802d189b32ff4c34476c93d3 Change-Id: If2ae48b21389e76fd638c0b48c148a5d4f227630 (cherry picked from commit 5e91493f7aaecef924a78f0743f812a225080085)
Diffstat (limited to 'manifests/profile/base')
-rw-r--r--manifests/profile/base/gnocchi/api.pp24
1 files changed, 12 insertions, 12 deletions
diff --git a/manifests/profile/base/gnocchi/api.pp b/manifests/profile/base/gnocchi/api.pp
index 21b8325..ab031f7 100644
--- a/manifests/profile/base/gnocchi/api.pp
+++ b/manifests/profile/base/gnocchi/api.pp
@@ -102,12 +102,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,
@@ -120,19 +119,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'],
- }
- }
}