Pacemaker: only create DB on pacemaker master

This fixes a bug introduced in 72fb672795
where non-master nodes would try to create the database (and potentially
fail due to a race).

Change-Id: Ic0c7b05618b69caca0d4019b5153163f2405bbe5
This commit is contained in:
Dan Prince 2016-06-10 14:14:57 -04:00
parent 3ea42597cb
commit b46cebf80a

View File

@ -35,12 +35,12 @@ class tripleo::profile::pacemaker::neutron::server (
include ::neutron::params
include ::tripleo::profile::pacemaker::neutron
if $step >= 2 {
$sync_db = ($::hostname == downcase($pacemaker_master))
if $step >= 2 and $sync_db {
include ::neutron::db::mysql
Exec<| title == 'galera-ready'|> -> Class['neutron::db::mysql']
}
$sync_db = ($::hostname == downcase($pacemaker_master))
if $step >= 4 or ( $step >= 3 and $sync_db ) {
include ::neutron::server::notifications
include ::neutron::server