
This patch modifies mistral::db::sync so that it runs 'update head' in addition to 'populate'. This brings the mistral "db_sync" class more inline with other Puppet Openstack modules that run DB sync and fixes issues in bootstrapping mistral in that running populate without first having an 'upgrade head' would always fail. Both actions appear to be idempotent so re-running them should be fine. Change-Id: I13f037c3eea944d5f41ced904623e38ce3fcae44
35 lines
1.1 KiB
Puppet
35 lines
1.1 KiB
Puppet
#
|
|
# Class to execute "mistral-db-manage 'upgrade head' and 'populate'"
|
|
#
|
|
class mistral::db::sync {
|
|
|
|
include ::mistral::params
|
|
|
|
Package<| tag =='mistral-common' |> ~> Exec['mistral-db-sync']
|
|
Exec['mistral-db-sync'] ~> Service<| tag == 'mistral-service' |>
|
|
Mistral_config <||> -> Exec['mistral-db-sync']
|
|
Mistral_config <| title == 'database/connection' |> ~> Exec['mistral-db-sync']
|
|
|
|
exec { 'mistral-db-sync':
|
|
command => $::mistral::params::db_sync_command,
|
|
path => '/usr/bin',
|
|
user => 'mistral',
|
|
logoutput => on_failure,
|
|
refreshonly => true,
|
|
}
|
|
|
|
Exec['mistral-db-sync'] -> Exec['mistral-db-populate']
|
|
Package<| tag =='mistral-common' |> ~> Exec['mistral-db-populate']
|
|
Exec['mistral-db-populate'] ~> Service<| tag == 'mistral-service' |>
|
|
Mistral_config <||> -> Exec['mistral-db-populate']
|
|
Mistral_config <| title == 'database/connection' |> ~> Exec['mistral-db-populate']
|
|
exec { 'mistral-db-populate':
|
|
command => $::mistral::params::db_populate_command,
|
|
path => '/usr/bin',
|
|
user => 'mistral',
|
|
logoutput => on_failure,
|
|
refreshonly => true,
|
|
}
|
|
|
|
}
|