Update resource references for dependencies

Newer versions of puppet are throwing catalog failures for resources
that are not being included in the testing. In this case, the references
should be updated to use our anchors from the neutron::deps class which
resolves the failures under the latest version of puppet.

Change-Id: I7ac3c90eb18118f90f0b92dabd3323a6575dac4c
Closes-Bug: #1702964
This commit is contained in:
Alex Schultz 2017-07-07 15:53:46 -06:00
parent 62f49da2eb
commit f92390204f
5 changed files with 6 additions and 3 deletions

View File

@ -354,7 +354,7 @@ class neutron::agents::ml2::ovs (
enable => $enabled,
# TODO: Remove this require once ovs-cleanup service
# script is packaged in neutron-openvswitch package
require => Package['neutron'],
require => Anchor['neutron::install::end'],
}
}
}

View File

@ -67,6 +67,7 @@ class neutron::deps {
Anchor['neutron::config::begin'] -> Neutron_vpnaas_agent_config<||> ~> Anchor['neutron::config::end']
Anchor['neutron::config::begin'] -> Neutron_vpnaas_service_config<||> ~> Anchor['neutron::config::end']
Anchor['neutron::config::begin'] -> Neutron_plugin_nsx<||> ~> Anchor['neutron::config::end']
Anchor['neutron::config::begin'] -> Neutron_rootwrap_config<||> ~> 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

View File

@ -28,6 +28,8 @@ class neutron::policy (
$policy_path = '/etc/neutron/policy.json',
) {
include ::neutron::deps
validate_hash($policies)
Openstacklib::Policy::Base {

View File

@ -25,7 +25,7 @@ class neutron::rootwrap (
$xenapi_connection_password = $::os_service_default,
) {
Neutron_rootwrap_config <||> ~> Service['neutron-ovs-agent-service']
include ::neutron::deps
neutron_rootwrap_config {
'xenapi/xenapi_connection_url': value => $xenapi_connection_url;

View File

@ -303,7 +303,7 @@ describe 'neutron::agents::ml2::ovs' do
is_expected.to contain_service('ovs-cleanup-service').with(
:name => platform_params[:ovs_cleanup_service],
:enable => true
).that_requires('Package[neutron]')
).that_requires('Anchor[neutron::install::end]')
is_expected.to contain_package('neutron-ovs-agent').that_requires('Anchor[neutron::install::begin]')
is_expected.to contain_package('neutron-ovs-agent').that_notifies('Anchor[neutron::install::end]')
end