Blob Blame History Raw
From 5d953a42b5f8a3a52bb894e4289b0d557c047a8a Mon Sep 17 00:00:00 2001
From: Lars Kellogg-Stedman <lars@redhat.com>
Date: Fri, 13 Jun 2014 21:32:20 -0400
Subject: [PATCH] stop puppet from breaking neutron

The neutron-ovs-cleanup service is meant to run at boot to tear down ovs
interfaces created by Neutron.  The service runs and then exits, which
means that from Puppet's perspective it is always "stopped".

By setting `ensure => started` on the neutron-ovs-cleanup service,
puppet was starting this service every time it runs, which would
completely disable Neutron networking.

This patch removes the `ensure` setting, such that the service will be
enabled and will run at boot but will not be erroneously started by
Puppet.

Change-Id: I5445fcd05f7cf5c48ded209a2895ea7d8732f40f
---
 manifests/agents/ovs.pp                 | 1 -
 spec/classes/neutron_agents_ovs_spec.rb | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/manifests/agents/ovs.pp b/manifests/agents/ovs.pp
index 289f67f..978c68e 100644
--- a/manifests/agents/ovs.pp
+++ b/manifests/agents/ovs.pp
@@ -144,7 +144,6 @@ class neutron::agents::ovs (
     }
     if $::neutron::params::ovs_cleanup_service {
       service {'ovs-cleanup-service':
-        ensure => $service_ensure,
         name   => $::neutron::params::ovs_cleanup_service,
         enable => $enabled,
       }
diff --git a/spec/classes/neutron_agents_ovs_spec.rb b/spec/classes/neutron_agents_ovs_spec.rb
index 9c1c581..b827baa 100644
--- a/spec/classes/neutron_agents_ovs_spec.rb
+++ b/spec/classes/neutron_agents_ovs_spec.rb
@@ -185,8 +185,7 @@ describe 'neutron::agents::ovs' do
     it 'configures neutron ovs cleanup service' do
       should contain_service('ovs-cleanup-service').with(
         :name    => platform_params[:ovs_cleanup_service],
-        :enable  => true,
-        :ensure  => 'running'
+        :enable  => true
       )
       should contain_package('neutron-plugin-ovs').with_before(/Service\[ovs-cleanup-service\]/)
     end
-- 
1.9.3