Add missing dependencies about ml2 plugins

neutron::plugins::ml2::netwokring_ansible should be applied after
neutron::plugins::ml2, otherwise purge_config can remove the parameters
unexpectedly.
Also, all plugin packages should be install before configuration
completes, otherwise these packages can be missing when actual
code should be referred.

Change-Id: Ide4e65b6deac381df954341adbb804c9432d8643
This commit is contained in:
Takashi Kajinami 2020-05-04 23:21:55 +09:00
parent aad8d248f8
commit 90277442a1
20 changed files with 29 additions and 21 deletions

View File

@ -82,6 +82,13 @@ class neutron::deps {
-> Package<| tag == 'neutron-support-package'|> -> Package<| tag == 'neutron-support-package'|>
-> Anchor['neutron::install::end'] -> Anchor['neutron::install::end']
# ml2 plugin packages should be install after we start actual configuration,
# because the configuraiton for ml2 plugin base should be applied before
# ml2 plugin packages are installed
Anchor['neutron::install::begin']
-> Package<| tag == 'neutron-plugin-ml2-package'|>
~> Anchor['neutron::config::end']
Anchor['neutron::service::end'] -> Neutron_l3_ovs_bridge<||> Anchor['neutron::service::end'] -> Neutron_l3_ovs_bridge<||>
Anchor['neutron::service::end'] -> Neutron_network<||> Anchor['neutron::service::end'] -> Neutron_network<||>
Anchor['neutron::service::end'] -> Neutron_port<||> Anchor['neutron::service::end'] -> Neutron_port<||>

View File

@ -52,7 +52,7 @@ class neutron::plugins::ml2::bagpipe (
package { 'python-networking-bagpipe': package { 'python-networking-bagpipe':
ensure => $package_ensure, ensure => $package_ensure,
name => $::neutron::params::bgpvpn_bagpipe_package, name => $::neutron::params::bgpvpn_bagpipe_package,
tag => 'openstack', tag => ['openstack', 'neutron-plugin-ml2-package']
} }
} }
} }

View File

@ -25,7 +25,7 @@ class neutron::plugins::ml2::bigswitch (
ensure_packages('python-networking-bigswitch', ensure_packages('python-networking-bigswitch',
{ {
ensure => $package_ensure, ensure => $package_ensure,
tag => 'openstack', tag => ['openstack', 'neutron-plugin-ml2-package']
} }
) )
warning('python-networking-bigswitch package management is deprecated, it will be dropped in a future release.') warning('python-networking-bigswitch package management is deprecated, it will be dropped in a future release.')

View File

@ -27,7 +27,7 @@ class neutron::plugins::ml2::cisco (
ensure_resource('package', 'python-networking-cisco', ensure_resource('package', 'python-networking-cisco',
{ {
ensure => $package_ensure, ensure => $package_ensure,
tag => 'openstack', tag => ['openstack', 'neutron-plugin-ml2-package']
} }
) )
warning('python-networking-cisco package management is deprecated, it will be dropped in a future release.') warning('python-networking-cisco package management is deprecated, it will be dropped in a future release.')

View File

@ -59,7 +59,7 @@ class neutron::plugins::ml2::cisco::vts (
ensure_resource('package', 'python-cisco-controller', ensure_resource('package', 'python-cisco-controller',
{ {
ensure => $package_ensure, ensure => $package_ensure,
tag => 'openstack', tag => ['openstack', 'neutron-plugin-ml2-package']
} }
) )

View File

@ -18,7 +18,7 @@ class neutron::plugins::ml2::fujitsu (
ensure_resource('package', 'python-networking-fujitsu', ensure_resource('package', 'python-networking-fujitsu',
{ {
ensure => $package_ensure, ensure => $package_ensure,
tag => 'openstack', tag => ['openstack', 'neutron-plugin-ml2-package']
} }
) )
} }

View File

@ -27,7 +27,7 @@ class neutron::plugins::ml2::mellanox (
ensure_resource('package', 'python-networking-mlnx', ensure_resource('package', 'python-networking-mlnx',
{ {
ensure => $package_ensure, ensure => $package_ensure,
tag => 'openstack' tag => ['openstack', 'neutron-plugin-ml2-package']
} }
) )
} }

View File

@ -38,6 +38,7 @@ class neutron::plugins::ml2::networking_ansible(
) { ) {
include neutron::deps include neutron::deps
include neutron::params include neutron::params
require ::neutron::plugins::ml2
if($::osfamily != 'RedHat') { if($::osfamily != 'RedHat') {
# Drivers are only packaged for RedHat at this time # Drivers are only packaged for RedHat at this time
@ -47,7 +48,7 @@ class neutron::plugins::ml2::networking_ansible(
ensure_resource('package', 'python2-networking-ansible', ensure_resource('package', 'python2-networking-ansible',
{ {
ensure => $package_ensure, ensure => $package_ensure,
tag => ['openstack', 'neutron-package'] tag => ['openstack', 'neutron-plugin-ml2-package']
} }
) )
create_resources(neutron::plugins::ml2::networking_ansible_host, $host_configs) create_resources(neutron::plugins::ml2::networking_ansible_host, $host_configs)

View File

@ -24,7 +24,7 @@ class neutron::plugins::ml2::networking_baremetal(
package { 'python2-networking-baremetal': package { 'python2-networking-baremetal':
ensure => $package_ensure, ensure => $package_ensure,
name => $::neutron::params::networking_baremetal_package, name => $::neutron::params::networking_baremetal_package,
tag => ['openstack', 'neutron-package'], tag => ['openstack', 'neutron-plugin-ml2-package'],
} }
} }
} }

View File

@ -60,7 +60,7 @@ class neutron::plugins::ml2::opendaylight (
ensure_resource('package', 'python-networking-odl', ensure_resource('package', 'python-networking-odl',
{ {
ensure => $package_ensure, ensure => $package_ensure,
tag => 'openstack', tag => ['openstack', 'neutron-plugin-ml2-package']
} }
) )

View File

@ -141,7 +141,7 @@ class neutron::plugins::ml2::ovn(
ensure_resource('package', $::neutron::params::ovn_plugin_package, ensure_resource('package', $::neutron::params::ovn_plugin_package,
{ {
ensure => $package_ensure, ensure => $package_ensure,
tag => 'openstack', tag => ['openstack', 'neutron-plugin-ml2-package']
} }
) )

View File

@ -22,7 +22,7 @@ describe 'neutron::plugins::ml2::bagpipe' do
should contain_package('python-networking-bagpipe').with( should contain_package('python-networking-bagpipe').with(
:name => platform_params[:bagpipe_package_name], :name => platform_params[:bagpipe_package_name],
:ensure => params[:package_ensure], :ensure => params[:package_ensure],
:tag => 'openstack' :tag => ['openstack', 'neutron-plugin-ml2-package']
) )
end end

View File

@ -31,7 +31,7 @@ describe 'neutron::plugins::ml2::bigswitch' do
it 'should have' do it 'should have' do
should contain_package('python-networking-bigswitch').with( should contain_package('python-networking-bigswitch').with(
:ensure => params[:package_ensure], :ensure => params[:package_ensure],
:tag => 'openstack' :tag => ['openstack', 'neutron-plugin-ml2-package']
) )
end end
end end

View File

@ -31,7 +31,7 @@ describe 'neutron::plugins::ml2::cisco' do
it 'should have' do it 'should have' do
should contain_package('python-networking-cisco').with( should contain_package('python-networking-cisco').with(
:ensure => params[:package_ensure], :ensure => params[:package_ensure],
:tag => 'openstack' :tag => ['openstack', 'neutron-plugin-ml2-package']
) )
end end
end end

View File

@ -37,7 +37,7 @@ describe 'neutron::plugins::ml2::cisco::vts' do
it 'should have' do it 'should have' do
should contain_package('python-cisco-controller').with( should contain_package('python-cisco-controller').with(
:ensure => params[:package_ensure], :ensure => params[:package_ensure],
:tag => 'openstack' :tag => ['openstack', 'neutron-plugin-ml2-package']
) )
end end

View File

@ -30,7 +30,7 @@ describe 'neutron::plugins::ml2::fujitsu' do
it 'should have' do it 'should have' do
should contain_package('python-networking-fujitsu').with( should contain_package('python-networking-fujitsu').with(
:ensure => params[:package_ensure], :ensure => params[:package_ensure],
:tag => 'openstack' :tag => ['openstack', 'neutron-plugin-ml2-package']
) )
end end
end end

View File

@ -31,7 +31,7 @@ describe 'neutron::plugins::ml2::mellanox' do
it 'should have' do it 'should have' do
should contain_package('python-networking-mlnx').with( should contain_package('python-networking-mlnx').with(
:ensure => params[:package_ensure], :ensure => params[:package_ensure],
:tag => 'openstack' :tag => ['openstack', 'neutron-plugin-ml2-package']
) )
end end
end end

View File

@ -34,10 +34,10 @@ describe 'neutron::plugins::ml2::networking_ansible' do
should contain_package('python2-networking-ansible').with( should contain_package('python2-networking-ansible').with(
:name => platform_params[:networking_ansible_package], :name => platform_params[:networking_ansible_package],
:ensure => p[:package_ensure], :ensure => p[:package_ensure],
:tag => ['openstack', 'neutron-package'], :tag => ['openstack', 'neutron-plugin-ml2-package'],
) )
should contain_package('python2-networking-ansible').that_requires('Anchor[neutron::install::begin]') should contain_package('python2-networking-ansible').that_requires('Anchor[neutron::install::begin]')
should contain_package('python2-networking-ansible').that_notifies('Anchor[neutron::install::end]') should contain_package('python2-networking-ansible').that_notifies('Anchor[neutron::config::end]')
end end
it 'should configure non-host config' do it 'should configure non-host config' do

View File

@ -22,10 +22,10 @@ describe 'neutron::plugins::ml2::networking_baremetal' do
should contain_package('python2-networking-baremetal').with( should contain_package('python2-networking-baremetal').with(
:name => platform_params[:networking_baremetal_package], :name => platform_params[:networking_baremetal_package],
:ensure => p[:package_ensure], :ensure => p[:package_ensure],
:tag => ['openstack', 'neutron-package'], :tag => ['openstack', 'neutron-plugin-ml2-package'],
) )
should contain_package('python2-networking-baremetal').that_requires('Anchor[neutron::install::begin]') should contain_package('python2-networking-baremetal').that_requires('Anchor[neutron::install::begin]')
should contain_package('python2-networking-baremetal').that_notifies('Anchor[neutron::install::end]') should contain_package('python2-networking-baremetal').that_notifies('Anchor[neutron::config::end]')
end end
end end

View File

@ -37,7 +37,7 @@ describe 'neutron::plugins::ml2::opendaylight' do
it 'should have' do it 'should have' do
should contain_package('python-networking-odl').with( should contain_package('python-networking-odl').with(
:ensure => params[:package_ensure], :ensure => params[:package_ensure],
:tag => 'openstack' :tag => ['openstack', 'neutron-plugin-ml2-package']
) )
end end