File: concurrency.pp

package info (click to toggle)
puppet-module-oslo 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 976 kB
  • sloc: ruby: 2,304; python: 38; makefile: 10; sh: 10
file content (30 lines) | stat: -rw-r--r-- 1,092 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
# == Define: oslo::concurrency
#
# Configure oslo_concurrency options
#
# This resource configures Oslo concurrency resources for an OpenStack service.
# It will manage the [oslo_concurrency] section in the given config resource.
#
# === Parameters:
#
# [*disable_process_locking*]
#  (Optional) Enables or disables inter-process locks. (boolean value)
#  Defaults to $facts['os_service_default'].
#
# [*lock_path*]
#  (Optional) Directory to use for lock files. For security, the specified directory
#  should only be writable by the user running the processes that need locking.
#  If external locks are used, a lock path must be set. (string value)
#  Defaults to $facts['os_service_default'].
#
define oslo::concurrency(
  $disable_process_locking = $facts['os_service_default'],
  $lock_path               = $facts['os_service_default'],
) {
  $concurrency_options = {
    'oslo_concurrency/disable_process_locking' => { value => $disable_process_locking },
    'oslo_concurrency/lock_path'               => { value => $lock_path }
  }

  create_resources($name, $concurrency_options)
}