Refactor resource dependencies

This refactors resource dependencies to avoid unnecessary dependencies
across services. For example zaqar service does not require cinder db.

Change-Id: I46c28803dd2eb0e88a25d165c768f61f565fd8e6
This commit is contained in:
Takashi Kajinami 2024-03-13 00:33:39 +09:00
parent 572fb50018
commit 7d966c22fa
5 changed files with 14 additions and 13 deletions

View File

@ -26,4 +26,8 @@ class mistral::coordination (
mistral_config {
'coordination/heartbeat_interval': value => $heartbeat_interval;
}
# all coordination settings should be applied and all packages should be
# installed before service startup
Oslo::Coordination['mistral_config'] -> Anchor['mistral::service::begin']
}

View File

@ -69,4 +69,7 @@ class mistral::db (
db_max_retries => $database_db_max_retries,
}
# all db settings should be applied and all packages should be installed
# before dbsync starts
Oslo::Db['mistral_config'] -> Anchor['mistral::dbsync::begin']
}

View File

@ -24,19 +24,6 @@ class mistral::deps {
~> Service<| tag == 'mistral-service' |>
~> anchor { 'mistral::service::end': }
# all coordination settings should be applied and all packages should be
# installed before service startup
Oslo::Coordination<||> -> Anchor['mistral::service::begin']
# all db settings should be applied and all packages should be installed
# before dbsync starts
Oslo::Db<||> -> Anchor['mistral::dbsync::begin']
# policy config should occur in the config block
Anchor['mistral::config::begin']
-> Openstacklib::Policy<| tag == 'mistral' |>
-> Anchor['mistral::config::end']
# We need openstackclient before marking service end so that mistral
# will have clients available to create resources. This tag handles the
# openstackclient but indirectly since the client is not available in

View File

@ -279,4 +279,6 @@ class mistral::keystone::authtoken(
service_type => $service_type,
interface => $interface;
}
Keystone::Resource::Authtoken['mistral_config'] -> Anchor['mistral::config::end']
}

View File

@ -70,6 +70,11 @@ class mistral::policy (
create_resources('openstacklib::policy', { $policy_path => $policy_parameters })
# policy config should occur in the config block
Anchor['mistral::config::begin']
-> Openstacklib::Policy[$policy_path]
-> Anchor['mistral::config::end']
oslo::policy { 'mistral_config':
enforce_scope => $enforce_scope,
enforce_new_defaults => $enforce_new_defaults,