From 54ffe9af558053cf34d21a35926799aad3f33d02 Mon Sep 17 00:00:00 2001 From: Yanis Guenane Date: Wed, 22 Oct 2014 11:31:47 -0400 Subject: [PATCH] Policies: Fix potential ordering issues Ensure the class neutron::policy is applied after the package has been installed. Change-Id: I0028073803add15c7a9967b646fd580599e4b3fb --- manifests/policy.pp | 1 - manifests/server.pp | 3 +++ spec/classes/neutron_server_spec.rb | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/manifests/policy.pp b/manifests/policy.pp index 1fb7368f6..434de7700 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -23,7 +23,6 @@ } class { 'openstacklib::policy' : policies => $policies, - before => Service['neutron-server'], } } diff --git a/manifests/server.pp b/manifests/server.pp index 99f55719a..4921fca7e 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -227,6 +227,7 @@ Nova_admin_tenant_id_setter<||> ~> Service['neutron-server'] Neutron_config<||> ~> Service['neutron-server'] Neutron_api_config<||> ~> Service['neutron-server'] + Class['neutron::policy'] ~> Service['neutron-server'] if $l3_ha { if $min_l3_agents_per_router <= $max_l3_agents_per_router or $max_l3_agents_per_router == '0' { @@ -351,6 +352,7 @@ Package['neutron-server'] -> Neutron_api_config<||> Package['neutron-server'] -> Neutron_config<||> Package['neutron-server'] -> Service['neutron-server'] + Package['neutron-server'] -> Class['neutron::policy'] package { 'neutron-server': ensure => $package_ensure, name => $::neutron::params::server_package, @@ -358,6 +360,7 @@ } else { # Some platforms (RedHat) does not provide a neutron-server package. # The neutron api config file is provided by the neutron package. + Package['neutron'] -> Class['neutron::policy'] Package['neutron'] -> Neutron_api_config<||> } diff --git a/spec/classes/neutron_server_spec.rb b/spec/classes/neutron_server_spec.rb index 5e601ff6a..878bee184 100644 --- a/spec/classes/neutron_server_spec.rb +++ b/spec/classes/neutron_server_spec.rb @@ -54,6 +54,7 @@ end it { should contain_class('neutron::params') } + it { should contain_class('neutron::policy') } it 'configures authentication middleware' do should contain_neutron_api_config('filter:authtoken/auth_host').with_value(p[:auth_host]);