File: sync.pp

package info (click to toggle)
puppet-module-mistral 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,004 kB
  • sloc: ruby: 2,093; python: 38; makefile: 11; sh: 10
file content (52 lines) | stat: -rw-r--r-- 1,372 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
#
# Class to execute "mistral-db-manage 'upgrade head' and 'populate'"
#
# ==Parameters
#
# [*db_sync_timeout*]
#   (Optional) Timeout for the execution of the db_sync
#   Defaults to 300
#
class mistral::db::sync(
  $db_sync_timeout = 300,
) {

  include mistral::deps
  include mistral::params

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

  exec { 'mistral-db-populate':
    require     => Exec['mistral-db-sync'],
    command     => $::mistral::params::db_populate_command,
    path        => '/usr/bin',
    user        => $::mistral::params::user,
    timeout     => $db_sync_timeout,
    logoutput   => on_failure,
    refreshonly => true,
    subscribe   => [
      Anchor['mistral::install::end'],
      Anchor['mistral::config::end'],
      Anchor['mistral::dbsync::begin']
    ],
    notify      => Anchor['mistral::dbsync::end'],
    tag         => 'openstack-db',
  }

}