From fa4c306485338e7ed95fabbb5d9839cda59e93df Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Wed, 20 Jul 2016 12:05:51 +0200 Subject: Fix Ironic dbsync ordering Including ::ironic runs ironic-dbsync by default, so we end up with ironic-dbsync run before the database is created. This patch fixes it. Change-Id: I6fef1de18e52b68caaf4cbd55c0408b98b5c26e0 Partially-Implements: blueprint ironic-integration --- manifests/profile/base/ironic.pp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'manifests') diff --git a/manifests/profile/base/ironic.pp b/manifests/profile/base/ironic.pp index dd30dd7..ca4f366 100644 --- a/manifests/profile/base/ironic.pp +++ b/manifests/profile/base/ironic.pp @@ -30,19 +30,20 @@ class tripleo::profile::base::ironic ( $bootstrap_node = hiera('bootstrap_nodeid', undef), $step = hiera('step'), ) { + # Database is accessed by both API and conductor, hence it's here. if $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false } - if $step >= 3 { - include ::ironic + if $step >= 3 and $sync_db { + include ::ironic::db::mysql + } - # Database is accessed by both API and conductor, hence it's here. - if $sync_db { - include ::ironic::db::mysql - include ::ironic::db::sync + if $step >= 4 or ($step >= 3 and $sync_db) { + class { '::ironic': + sync_db => $sync_db, } } } -- cgit 1.2.3-korg