diff --git a/manifests/api.pp b/manifests/api.pp index 6e270ef4..a705f813 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -117,6 +117,11 @@ class manila::api ( tag => 'manila-service', } + # On any api-paste.ini config change, we must restart Manila API. + Manila_api_paste_ini<||> ~> Service['manila-api'] + # On any uwsgi config change, we must restart Manila API. + Manila_api_uwsgi_config<||> ~> Service['manila-api'] + } elsif $service_name == 'httpd' { # We need to make sure manila-api/eventlet is stopped before trying to # start apache @@ -129,6 +134,10 @@ class manila::api ( Service <| title == 'httpd' |> { tag +> 'manila-service' } Service['manila-api'] -> Service[$service_name] + + # On any api-paste.ini config change, we must restart Manila API. + Manila_api_paste_ini<||> ~> Service[$service_name] + } else { fail("Invalid service_name. Either use manila-api/openstack-manila-api \ for running as a standalone service, or httpd for being run by a httpd \ diff --git a/manifests/coordination.pp b/manifests/coordination.pp index 2dfa4760..300662a7 100644 --- a/manifests/coordination.pp +++ b/manifests/coordination.pp @@ -17,4 +17,8 @@ class manila::coordination ( oslo::coordination{ 'manila_config': backend_url => $backend_url } + + # all coordination settings should be applied and all packages should be + # installed before service startup + Oslo::Coordination['manila_config'] -> Anchor['manila::service::begin'] } diff --git a/manifests/db.pp b/manifests/db.pp index b85afb8c..83123959 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -68,4 +68,8 @@ class manila::db ( mysql_enable_ndb => $mysql_enable_ndb, db_max_retries => $database_db_max_retries, } + + # all db settings should be applied and all packages should be installed + # before dbsync starts + Oslo::Db['manila_config'] -> Anchor['manila::dbsync::begin'] } diff --git a/manifests/deps.pp b/manifests/deps.pp index f01f0abd..fb8b7558 100644 --- a/manifests/deps.pp +++ b/manifests/deps.pp @@ -24,34 +24,19 @@ class manila::deps { ~> Service<| tag == 'manila-service' |> ~> anchor { 'manila::service::end': } - # paste-api.ini config should occur in the config block also. Anchor['manila::config::begin'] -> Manila_api_paste_ini<||> - ~> Anchor['manila::config::end'] + -> Anchor['manila::config::end'] + + Anchor['manila::config::begin'] + -> Manila_api_uwsgi_config<||> + -> Anchor['manila::config::end'] # rootwrap config should occur in the config block also. Anchor['manila::config::begin'] -> Manila_rootwrap_config<||> ~> Anchor['manila::config::end'] - # all coordination settings should be applied and all packages should be - # installed before service startup - Oslo::Coordination<||> -> Anchor['manila::service::begin'] - - # all db settings should be applied and all packages should be installed - # before dbsync starts - Oslo::Db<||> -> Anchor['manila::dbsync::begin'] - - # policy config should occur in the config block also. - Anchor['manila::config::begin'] - -> Openstacklib::Policy<| tag == 'manila' |> - -> Anchor['manila::config::end'] - - # On any uwsgi config change, we must restart Manila API. - Anchor['manila::config::begin'] - -> Manila_api_uwsgi_config<||> - ~> Anchor['manila::config::end'] - # Support packages need to be installed in the install phase, but we don't # put them in the chain above because we don't want any false dependencies # between packages with the manila-package tag and the manila-support-package diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index e410f460..f79d5db5 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -279,4 +279,6 @@ class manila::keystone::authtoken( service_type => $service_type, interface => $interface; } + + Keystone::Resource::Authtoken['manila_config'] -> Anchor['manila::config::end'] } diff --git a/manifests/policy.pp b/manifests/policy.pp index a745d66d..57c69bef 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -70,6 +70,11 @@ class manila::policy ( create_resources('openstacklib::policy', { $policy_path => $policy_parameters }) + # policy config should occur in the config block also. + Anchor['manila::config::begin'] + -> Openstacklib::Policy[$policy_path] + -> Anchor['manila::config::end'] + oslo::policy { 'manila_config': enforce_scope => $enforce_scope, enforce_new_defaults => $enforce_new_defaults,