Skip to content

Commit

Permalink
Use stdlib to manage OVS package
Browse files Browse the repository at this point in the history
OVS package is managed by both OVS agent and ML2 plugin, which could
cause a dupplicate resource error.
Using stdlib would fix the problem.

Closes-bug #1316623

Change-Id: Icfb8d9e5b077845edd726e92576f36189c6b7553
  • Loading branch information
Emilien Macchi committed May 6, 2014
1 parent 1be121a commit 66c436b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions manifests/agents/ovs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,10 @@
Package['neutron-plugin-ovs'] -> Neutron_plugin_ovs<||>
Package['neutron-plugin-ovs'] -> Service['ovs-cleanup-service']

if ! defined(Package['neutron-plugin-ovs']) {
package { 'neutron-plugin-ovs':
ensure => $package_ensure,
name => $::neutron::params::ovs_server_package,
}
}
ensure_resource('package', 'neutron-plugin-ovs', {
ensure => $package_ensure,
name => $::neutron::params::ovs_server_package,
})
}

if $manage_service {
Expand Down
4 changes: 2 additions & 2 deletions manifests/plugins/ml2.pp
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@
# Specific plugin configuration
if ('openvswitch' in $mechanism_drivers) {
if ($::osfamily == 'RedHat') {
package { 'neutron-plugin-ovs':
ensure_resource('package', 'neutron-plugin-ovs', {
ensure => present,
name => $::neutron::params::ovs_server_package,
}
})
Package['neutron-plugin-ovs'] -> Neutron_plugin_ovs<||>
}
if ('l2population' in $mechanism_drivers) {
Expand Down

0 comments on commit 66c436b

Please sign in to comment.