Puppet Class: magnum::db::sync

Defined in:
manifests/db/sync.pp

Overview

Class to execute magnum-manage db_sync

Parameters

user

(Optional) User to run dbsync command. Defaults to ‘magnum’

extra_params

(Optional) String of extra command line parameters to append to the magnum-dbsync command. Defaults to ”

db_sync_timeout

(Optional) Timeout for the execution of the db_sync Defaults to 300

DEPRECATED PARAMETERS

exec_path

(Optional) The path to use for finding the magnum-db-manage binary. Defaults to undef

Parameters:

  • user (Any) (defaults to: 'magnum')
  • extra_params (Any) (defaults to: '')
  • db_sync_timeout (Any) (defaults to: 300)
  • exec_path (Any) (defaults to: undef)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'manifests/db/sync.pp', line 25

class magnum::db::sync(
  $user            = 'magnum',
  $extra_params    = '',
  $db_sync_timeout = 300,
  # DEPRECATED PARAMETERS
  $exec_path       = undef,
) {

  include magnum::deps
  include magnum::params

  if $exec_path != undef {
    warning('The exec_path parameter is deprecated and has no effect')
  }

  exec { 'magnum-db-sync':
    command     => "magnum-db-manage ${extra_params} upgrade head",
    path        => ['/bin', '/usr/bin'],
    user        => $::magnum::params::user,
    refreshonly => true,
    try_sleep   => 5,
    tries       => 10,
    timeout     => $db_sync_timeout,
    logoutput   => on_failure,
    subscribe   => [
      Anchor['magnum::install::end'],
      Anchor['magnum::config::end'],
      Anchor['magnum::dbsync::begin']
    ],
    notify      => Anchor['magnum::dbsync::end'],
    tag         => 'openstack-db',
  }

}