diff --git a/manifests/cache.pp b/manifests/cache.pp index 9f64179dd..7f56edec0 100644 --- a/manifests/cache.pp +++ b/manifests/cache.pp @@ -243,4 +243,8 @@ class neutron::cache ( hashclient_retry_delay => $hashclient_retry_delay, dead_timeout => $dead_timeout, } + + # all cache settings should be applied and all packages should be installed + # before service startup + Oslo::Cache['neutron_config'] -> Anchor['neutron::service::begin'] } diff --git a/manifests/db.pp b/manifests/db.pp index 93693efa2..33801f51a 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -72,4 +72,7 @@ class neutron::db ( } + # all db settings should be applied and all packages should be installed + # before dbsync starts + Oslo::Db['neutron_config'] -> Anchor['neutron::dbsync::begin'] } diff --git a/manifests/deps.pp b/manifests/deps.pp index addbb8be0..f41e4942c 100644 --- a/manifests/deps.pp +++ b/manifests/deps.pp @@ -33,11 +33,12 @@ class neutron::deps { File<| tag == 'neutron-config-file' |> -> File_line<| tag == 'neutron-file-line' |> # All other inifile providers need to be processed in the config block + Anchor['neutron::config::begin'] -> Neutron_api_paste_ini<||> -> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_api_uwsgi_config<||> -> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_agent_linuxbridge<||> -> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_agent_macvtap<||> -> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_agent_ovs<||> -> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_agent_ovn<||> -> Anchor['neutron::config::end'] - Anchor['neutron::config::begin'] -> Neutron_api_paste_ini<||> ~> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_bgpvpn_bagpipe_config<||> -> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_bgpvpn_service_config<||> ~> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Neutron_sfc_service_config<||> ~> Anchor['neutron::config::end'] @@ -57,12 +58,6 @@ class neutron::deps { Anchor['neutron::config::begin'] -> Neutron_rootwrap_config<||> ~> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Ovn_metadata_agent_config<||> -> Anchor['neutron::config::end'] Anchor['neutron::config::begin'] -> Ironic_neutron_agent_config<||> -> Anchor['neutron::config::end'] - Anchor['neutron::config::begin'] -> Neutron_api_uwsgi_config<||> ~> Anchor['neutron::config::end'] - - # policy config should occur in the config block also. - Anchor['neutron::config::begin'] - -> Openstacklib::Policy<| tag == 'neutron' |> - -> Anchor['neutron::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 @@ -82,14 +77,6 @@ class neutron::deps { -> Package<| tag == 'neutron-plugin-ml2-package'|> ~> Anchor['neutron::config::end'] - # all cache settings should be applied and all packages should be installed - # before service startup - Oslo::Cache<||> -> Anchor['neutron::service::begin'] - - # all db settings should be applied and all packages should be installed - # before dbsync starts - Oslo::Db<||> -> Anchor['neutron::dbsync::begin'] - # We need openstackclient before marking service end so that neutron # will have clients available to create resources. This tag handles the # openstackclient but indirectly since the client is not available in diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index 617548bd4..146a02a01 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -279,4 +279,6 @@ class neutron::keystone::authtoken( service_type => $service_type, interface => $interface; } + + Keystone::Resource::Authtoken['neutron_config'] -> Anchor['neutron::config::end'] } diff --git a/manifests/policy.pp b/manifests/policy.pp index 44aa867b7..c5e19d188 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -70,6 +70,11 @@ class neutron::policy ( create_resources('openstacklib::policy', { $policy_path => $policy_parameters }) + # policy config should occur in the config block also. + Anchor['neutron::config::begin'] + -> Openstacklib::Policy[$policy_path] + -> Anchor['neutron::config::end'] + oslo::policy { 'neutron_config': enforce_scope => $enforce_scope, enforce_new_defaults => $enforce_new_defaults, diff --git a/manifests/server.pp b/manifests/server.pp index eb6759924..d4c34fb59 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -398,8 +398,11 @@ the neutron::services::vpnaas class.") hasrestart => true, tag => ['neutron-service', 'neutron-server-eventlet'], } + Neutron_api_paste_ini<||> ~> Service['neutron-server'] + } elsif $service_name == 'httpd' { fail('Use api_service_name and rpc_service_name to run api service by httpd') + } else { warning('Support for arbitrary service name is deprecated') # backward compatibility so operators can customize the service name. @@ -412,6 +415,7 @@ the neutron::services::vpnaas class.") tag => ['neutron-service'], } } + } else { if $::neutron::params::server_service { # we need to make sure neutron-server is stopped before trying to @@ -429,9 +433,10 @@ the neutron::services::vpnaas class.") if $api_service_name { if $api_service_name == 'httpd' { Service <| title == 'httpd' |> { tag +> 'neutron-service' } + Neutron_api_paste_ini<||> ~> Service[$api_service_name] if $::neutron::params::server_service { - Service['neutron-server'] -> Service['httpd'] + Service['neutron-server'] -> Service[$api_service_name] } if $::neutron::params::api_service_name { @@ -445,8 +450,9 @@ the neutron::services::vpnaas class.") hasrestart => true, tag => ['neutron-service'], } - Service['neutron-api'] -> Service['httpd'] + Service['neutron-api'] -> Service[$api_service_name] } + } else { service { 'neutron-api': ensure => $service_ensure, @@ -457,6 +463,9 @@ the neutron::services::vpnaas class.") tag => ['neutron-service', 'neutron-server-eventlet'], } + Neutron_api_paste_ini<||> ~> Service['neutron-api'] + Neutron_api_uwsgi_config<||> ~> Service['neutron-api'] + if $::neutron::params::server_service { Service['neutron-server'] -> Service['neutron-api'] }