Skip to content

Commit

Permalink
Policies: Fix potential ordering issues
Browse files Browse the repository at this point in the history
Ensure the class neutron::policy is applied after the package has
been installed.

Change-Id: I0028073803add15c7a9967b646fd580599e4b3fb
  • Loading branch information
Spredzy committed Oct 22, 2014
1 parent 07546a6 commit 54ffe9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion manifests/policy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
}
class { 'openstacklib::policy' :
policies => $policies,
before => Service['neutron-server'],
}

}
3 changes: 3 additions & 0 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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' {
Expand Down Expand Up @@ -351,13 +352,15 @@
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,
}
} 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<||>
}

Expand Down
1 change: 1 addition & 0 deletions spec/classes/neutron_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 54ffe9a

Please sign in to comment.