fix bug setting device
The device set for the storage mount point was hard-coded to /dev/$name. This value is only valid when no device is supplied to the storage xfs setup. This commit updates it to use the target_device which is either the device that was passed, or /dev/$name if not device is specified.
This commit is contained in:
parent
0ebf9d6143
commit
b379804ca9
@ -50,7 +50,7 @@ define swift::storage::xfs(
|
||||
}
|
||||
|
||||
swift::storage::mount { $name:
|
||||
device => "/dev/${name}",
|
||||
device => $target_device,
|
||||
mnt_base_dir => $mnt_base_dir,
|
||||
subscribe => Exec["mkfs-${name}"],
|
||||
loopback => $loopback,
|
||||
|
@ -7,14 +7,14 @@ describe 'swift::storage::xfs' do
|
||||
describe 'when a device is specified' do
|
||||
let :default_params do
|
||||
{
|
||||
:device => 'some_device',
|
||||
:device => "/dev/#{title}",
|
||||
:byte_size => '1024',
|
||||
:mnt_base_dir => '/srv/node',
|
||||
:loopback => false
|
||||
}
|
||||
end
|
||||
|
||||
[{:device => 'some_device'},
|
||||
[{},
|
||||
{
|
||||
:device => 'some_device',
|
||||
:byte_size => 1,
|
||||
@ -38,8 +38,8 @@ describe 'swift::storage::xfs' do
|
||||
:require => 'Package[xfsprogs]'
|
||||
)}
|
||||
|
||||
it { should contain_swift__storage__mount('foo').with(
|
||||
:device => '/dev/foo',
|
||||
it { should contain_swift__storage__mount(title).with(
|
||||
:device => param_hash[:device],
|
||||
:mnt_base_dir => param_hash[:mnt_base_dir],
|
||||
:loopback => param_hash[:loopback],
|
||||
:subscribe => 'Exec[mkfs-foo]'
|
||||
|
Loading…
x
Reference in New Issue
Block a user