Files
puppet-nova/manifests/db/sync_api.pp
Alex Schultz 055f91446f Enable cell_v2 setup by default
In Ocata, nova has made the cell_v2 setup mandatory as part of the
upgrade process in I72fb724dc13e1a5f4e97c58915b538ba761c582d. This
change makes the cell_v2 setup part of the default install for Ocata as
this feature will be required for some parts of nova in Ocata.

Depends-On: I693239ff5026f58a65eb6278b1a8fcb97af4f561
Depends-On: I08efa36f5f62ae406ab20e8da77c01fbf3d9b11f
Change-Id: I7839e3c8bfdec96b0d372e7a9d3511289e8004b9
Related-Bug: #1649341
2016-12-23 03:57:42 +00:00

43 lines
1.0 KiB
Puppet

#
# Class to execute nova api_db sync
#
# ==Parameters
#
# [*extra_params*]
# (optional) String of extra command line parameters to append
# to the nova-manage db sync command. These will be inserted in
# the command line between 'nova-manage' and 'db sync'.
# Defaults to undef
#
# [*cellv2_setup*]
# (optional) This flag toggles if we run the cell_v2 simple_cell_setup action
# with nova-manage.
# Defaults to true.
#
class nova::db::sync_api(
$extra_params = undef,
$cellv2_setup = true,
) {
include ::nova::deps
include ::nova::params
exec { 'nova-db-sync-api':
command => "/usr/bin/nova-manage ${extra_params} api_db sync",
refreshonly => true,
try_sleep => 5,
tries => 10,
logoutput => on_failure,
subscribe => [
Anchor['nova::install::end'],
Anchor['nova::config::end'],
Anchor['nova::dbsync_api::begin']
],
notify => Anchor['nova::dbsync_api::end'],
}
if $cellv2_setup {
include ::nova::db::sync_cell_v2
}
}