From 272937ed9c077e779d25734e6aba4668efd1f0f1 Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Sun, 26 Feb 2012 21:09:50 -0800 Subject: [PATCH 1/2] Pass correct mount dir to swift::storage::mount Previously, swift::storage::xfs was not passing the correct variable for mnt_base_dir to swift::storage::mount. $mount_base_dir was incorrectly specified. This commit resolves this mistake and ensures that the correct variable is passed. --- manifests/storage/xfs.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/storage/xfs.pp b/manifests/storage/xfs.pp index 93081f57..5c09cf38 100644 --- a/manifests/storage/xfs.pp +++ b/manifests/storage/xfs.pp @@ -27,7 +27,7 @@ define swift::storage::xfs( swift::storage::mount { $name: device => $device, - mnt_base_dir => $mount_base_dir, + mnt_base_dir => $mnt_base_dir, subscribe => Exec["mkfs-${name}"] } From 4acfaeaa9dce0a4dd68a423253936053169e5ad6 Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Sun, 26 Feb 2012 21:19:13 -0800 Subject: [PATCH 2/2] Update stoage::xfs tests This file was accidentally checked in before the tests works. This commit fixes the spec tests. --- spec/defines/swift_storage_xfs_spec.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spec/defines/swift_storage_xfs_spec.rb b/spec/defines/swift_storage_xfs_spec.rb index 2a26b703..e6ff769d 100644 --- a/spec/defines/swift_storage_xfs_spec.rb +++ b/spec/defines/swift_storage_xfs_spec.rb @@ -18,12 +18,13 @@ describe 'swift::storage::xfs' do :mnt_base_dir => '/srv/node'} end - [{}, - {:byte_size => 1, + [{:device => 'some_device'}, + {:device => 'some_device', + :byte_size => 1, :mnt_base_dir => '/mnt/foo'} ].each do |param_set| - describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do + describe "#{param_set == {} ? "using default" : "specifying"} class parameters" do let :param_hash do default_params.merge(param_set) end @@ -32,7 +33,7 @@ describe 'swift::storage::xfs' do param_set end - it { should contain_exec("exec-foo").with( + it { should contain_exec("mkfs-foo").with( :command => "mkfs.xfs -i size=#{param_hash[:byte_size]} #{param_hash[:device]}", :path => ['/sbin/'], :refreshonly => true, @@ -42,7 +43,7 @@ describe 'swift::storage::xfs' do it { should contain_swift__storage__mount('foo').with( {:device => param_hash[:device], :mnt_base_dir => param_hash[:mnt_base_dir], - :subscribe => 'Exec[mkfs-foo']} + :subscribe => 'Exec[mkfs-foo]'} )} end