diff --git a/resources/neutron_plugins_ovs_puppet/README.md b/resources/neutron_plugins_ovs_puppet/README.md index 7601306..af945af 100644 --- a/resources/neutron_plugins_ovs_puppet/README.md +++ b/resources/neutron_plugins_ovs_puppet/README.md @@ -5,6 +5,8 @@ This configures the plugin for the API server, but does nothing about configuring the agents that must also run and share a config file with the OVS plugin if both are on the same machine. +Note, this plugin was deprecated, you may want to use the ML2 plugin instead. + NB: don't need tunnel ID range when using VLANs, *but* you do need the network vlan range regardless of type, because the list of networks there is still important diff --git a/resources/neutron_plugins_ovs_puppet/actions/remove.pp b/resources/neutron_plugins_ovs_puppet/actions/remove.pp index 185c953..1ab6545 100644 --- a/resources/neutron_plugins_ovs_puppet/actions/remove.pp +++ b/resources/neutron_plugins_ovs_puppet/actions/remove.pp @@ -7,4 +7,9 @@ include neutron::params package { 'neutron': ensure => 'absent', name => $::neutron::params::package_name, +} + +# Remove external class dependency +Service <| title == 'neutron-plugin-ovs-service' |> { + require => undef } \ No newline at end of file diff --git a/resources/neutron_plugins_ovs_puppet/actions/run.pp b/resources/neutron_plugins_ovs_puppet/actions/run.pp index fe3b552..1eb39ef 100644 --- a/resources/neutron_plugins_ovs_puppet/actions/run.pp +++ b/resources/neutron_plugins_ovs_puppet/actions/run.pp @@ -16,6 +16,8 @@ $network_vlan_ranges = $resource['input']['network_vlan_ranges']['value'] $tunnel_id_ranges = $resource['input']['tunnel_id_ranges']['value'] $vxlan_udp_port = $resource['input']['vxlan_udp_port']['value'] +# Stamp neutron head, if current version is None, or upgrade head would fail later +$command = '/usr/bin/neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini' class { 'neutron::plugins::ovs': package_ensure => $package_ensure, sql_connection => "mysql://${db_user}:${db_password}@${db_host}/${db_name}", @@ -26,6 +28,13 @@ class { 'neutron::plugins::ovs': network_vlan_ranges => $network_vlan_ranges, tunnel_id_ranges => $tunnel_id_ranges, vxlan_udp_port => $vxlan_udp_port, +} -> + +exec { 'neutron-db-sync': + provider => 'shell', + command => "${command} stamp head", + path => [ '/usr/bin', '/bin' ], + onlyif => "${command} current | grep -qE '^Current revision.*None$' " } include neutron::params @@ -38,4 +47,4 @@ package { 'neutron': # Remove external class dependency Service <| title == 'neutron-plugin-ovs-service' |> { require => undef -} \ No newline at end of file +} diff --git a/resources/neutron_puppet/actions/run.pp b/resources/neutron_puppet/actions/run.pp index 42cabe9..a0ee911 100644 --- a/resources/neutron_puppet/actions/run.pp +++ b/resources/neutron_puppet/actions/run.pp @@ -117,4 +117,4 @@ class { 'neutron': log_facility => $log_facility, log_file => $log_file, log_dir => $log_dir, -} \ No newline at end of file +} diff --git a/resources/neutron_server_puppet/actions/remove.pp b/resources/neutron_server_puppet/actions/remove.pp index 83dbcca..ecaed03 100644 --- a/resources/neutron_server_puppet/actions/remove.pp +++ b/resources/neutron_server_puppet/actions/remove.pp @@ -2,4 +2,9 @@ class { 'neutron::server': enabled => false, package_ensure => 'absent', auth_password => 'not important as removed', +} + +# Remove external class dependency +Service <| title == 'neutron-server' |> { + require => undef } \ No newline at end of file