From 4d3e0665c64d86ed4f66a97a9909a2c2892d54eb Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 6 Jan 2016 10:33:33 -0500 Subject: [PATCH] setup_test_volume: stop managing /var/lib/cinder /var/lib/cinder is already managed by packaging. We should not manage it with Puppet, it can lead to permissions and orchestration issues. Instead, just require cinder packaging before managing lvm volumes. Change-Id: I14275a326c0e655dce5d2a27e45811bba66602b2 Closes-bug: #1531521 --- manifests/setup_test_volume.pp | 8 +------- spec/classes/cinder_setup_test_volume_spec.rb | 6 +----- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/manifests/setup_test_volume.pp b/manifests/setup_test_volume.pp index b710e8f0..0f183064 100644 --- a/manifests/setup_test_volume.pp +++ b/manifests/setup_test_volume.pp @@ -23,13 +23,7 @@ class cinder::setup_test_volume( ) { package { 'lvm2': - ensure => present, - } ~> - - file { $volume_path: - ensure => directory, - owner => 'cinder', - group => 'cinder', + ensure => present, require => Package['cinder'], } ~> diff --git a/spec/classes/cinder_setup_test_volume_spec.rb b/spec/classes/cinder_setup_test_volume_spec.rb index 08e46864..883c5527 100644 --- a/spec/classes/cinder_setup_test_volume_spec.rb +++ b/spec/classes/cinder_setup_test_volume_spec.rb @@ -3,11 +3,7 @@ require 'spec_helper' describe 'cinder::setup_test_volume' do it { is_expected.to contain_package('lvm2').with( - :ensure => 'present' - ) } - - it { is_expected.to contain_file('/var/lib/cinder').with( - :ensure => 'directory', + :ensure => 'present', :require => 'Package[cinder]' ) }