puppet-zaqar/manifests/deps.pp
Takashi Kajinami bfc5dac613 Do not restart services after policy file changes
The oslo.policy library has implementations to detect change in policy
rules and reload the new rules without service restart.

Change-Id: I96e2447ddf1a3e5c043bbc3529cdd7dcc3316d2d
2023-09-11 12:36:06 +09:00

44 lines
1.7 KiB
Puppet

# == Class: zaqar::deps
#
# Zaqar anchors and dependency management
#
class zaqar::deps {
# Setup anchors for install, config and service phases of the module. These
# anchors allow external modules to hook the begin and end of any of these
# phases. Package or service management can also be replaced by ensuring the
# package is absent or turning off service management and having the
# replacement depend on the appropriate anchors. When applicable, end tags
# should be notified so that subscribers can determine if installation,
# config or service state changed and act on that if needed.
anchor { 'zaqar::install::begin': }
-> Package<| tag == 'zaqar-package'|>
~> anchor { 'zaqar::install::end': }
-> anchor { 'zaqar::config::begin': }
-> Zaqar_config<||>
~> anchor { 'zaqar::config::end': }
-> anchor { 'zaqar::db::begin': }
-> anchor { 'zaqar::db::end': }
~> anchor { 'zaqar::dbsync::begin': }
-> anchor { 'zaqar::dbsync::end': }
~> anchor { 'zaqar::service::begin': }
~> Service<| tag == 'zaqar-service' |>
~> anchor { 'zaqar::service::end': }
# all cache settings should be applied and all packages should be installed
# before service startup
Oslo::Cache<||> -> Anchor['zaqar::service::begin']
# all db settings should be applied and all packages should be installed
# before dbsync starts
Oslo::Db<||> -> Anchor['zaqar::dbsync::begin']
# policy config should occur in the config block also.
Anchor['zaqar::config::begin']
-> Openstacklib::Policy<| tag == 'zaqar' |>
-> Anchor['zaqar::config::end']
# Installation or config changes will always restart services.
Anchor['zaqar::install::end'] ~> Anchor['zaqar::service::begin']
Anchor['zaqar::config::end'] ~> Anchor['zaqar::service::begin']
}