File: online_data_migrations.pp

package info (click to toggle)
puppet-module-ironic 27.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,612 kB
  • sloc: ruby: 5,990; python: 33; makefile: 10; sh: 10
file content (40 lines) | stat: -rw-r--r-- 1,198 bytes parent folder | download
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
#
# Class to execute ironic online_data_migrations
#
# ==Parameters
#
# [*extra_params*]
#   (optional) String of extra command line parameters to append
#   to the ironic-dbsync command.
#   Defaults to undef
#
# [*migration_params*]
#   (optional) String of extra command line parameters to pass to migrations.
#   Unlike extra_params, these apply to migrations themselves, not to the
#   ironic-dbsync command.
#   Defaults to undef
#
class ironic::db::online_data_migrations (
  $extra_params     = undef,
  $migration_params = undef,
) {
  include ironic::deps
  include ironic::params

  exec { 'ironic-db-online-data-migrations':
    command     => "${ironic::params::dbsync_command} ${extra_params} online_data_migrations ${migration_params}",
    path        => '/usr/bin',
    user        => $ironic::params::user,
    refreshonly => true,
    try_sleep   => 5,
    tries       => 10,
    logoutput   => on_failure,
    subscribe   => [
      Anchor['ironic::install::end'],
      Anchor['ironic::config::end'],
      Anchor['ironic::dbsync::end'],
      Anchor['ironic::db_online_data_migrations::begin']
    ],
    notify      => Anchor['ironic::db_online_data_migrations::end'],
  }
}