Merge "Refactor resource dependencies"

This commit is contained in:
Zuul 2024-03-14 17:51:51 +00:00 committed by Gerrit Code Review
commit d7ffee80e2
5 changed files with 19 additions and 17 deletions

View File

@ -196,6 +196,9 @@ class trove::api(
package_name => $::trove::params::api_package_name,
service_name => $service_name,
}
if $manage_service {
Trove_api_paste_ini<||> ~> Service['trove-api']
}
} elsif $service_name == 'httpd' {
trove::generic_service { 'api':
enabled => false,
@ -207,6 +210,7 @@ class trove::api(
if $manage_service {
Service<| title == 'httpd' |> { tag +> 'trove-service' }
Service['trove-api'] -> Service[$service_name]
Trove_api_paste_ini<||> ~> Service['httpd']
}
} else {
fail("Invalid service_name. Either trove-api/openstack-trove-api for \

View File

@ -61,4 +61,8 @@ class trove::db (
pool_timeout => $database_pool_timeout,
mysql_enable_ndb => $mysql_enable_ndb,
}
# all db settings should be applied and all packages should be installed
# before dbsync starts
Oslo::Db['trove_config'] -> Anchor['trove::dbsync::begin']
}

View File

@ -24,27 +24,13 @@ class trove::deps {
~> Service<| tag == 'trove-service' |>
~> anchor { 'trove::service::end': }
# Include all the other trove config pieces in the config block.
# Don't put them above because there's no chain between each individual part
# of the config.
Anchor['trove::config::begin']
-> Trove_guestagent_config<||>
~> Anchor['trove::config::end']
# Also include paste ini config in the config section
Anchor['trove::config::begin']
-> Trove_api_paste_ini<||>
~> Anchor['trove::config::end']
# policy config should occur in the config block also as soon as
# puppet-trove supports it. Leave commented out for now.
Anchor['trove::config::begin']
-> Openstacklib::Policy<| tag == 'trove' |>
-> Anchor['trove::config::end']
# all db settings should be applied and all packages should be installed
# before dbsync starts
Oslo::Db<||> -> Anchor['trove::dbsync::begin']
Anchor['trove::config::begin']
-> Trove_api_paste_ini<||>
-> Anchor['trove::config::end']
# We need openstackclient installed before marking service end so that trove
# will have clients available to create resources. This tag handles the

View File

@ -276,4 +276,6 @@ class trove::keystone::authtoken(
service_type => $service_type,
interface => $interface,
}
Keystone::Resource::Authtoken['trove_config'] -> Anchor['trove::config::end']
}

View File

@ -70,6 +70,12 @@ class trove::policy (
create_resources('openstacklib::policy', { $policy_path => $policy_parameters })
# policy config should occur in the config block also as soon as
# puppet-trove supports it. Leave commented out for now.
Anchor['trove::config::begin']
-> Openstacklib::Policy[$policy_path]
-> Anchor['trove::config::end']
oslo::policy { 'trove_config':
enforce_scope => $enforce_scope,
enforce_new_defaults => $enforce_new_defaults,