Skip to content

Commit

Permalink
Merge pull request #20 from rightscale-cookbooks/white_14_07_acu11293…
Browse files Browse the repository at this point in the history
…9_ephemeral_set_fstab_to_nopass

Set pass in /etc/fstab entry to 0.
  • Loading branch information
douglaswth committed Jun 6, 2014
2 parents 0809ed9 + af21181 commit 9b02927
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ platforms:
- name: ubuntu-12.04
driver_config:
box: opscode-ubuntu-12.04
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box
- name: ubuntu-10.04
driver_config:
box: opscode-ubuntu-10.04
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_provisionerless.box
- name: centos-6.4
box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-10.04_chef-provisionerless.box
- name: centos-6.5
driver_config:
box: opscode-centos-6.4
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box
box: opscode-centos-6.5
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box
- name: centos-5.9
driver_config:
box: opscode-centos-5.9
Expand Down
2 changes: 1 addition & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
logical_volume node['ephemeral_lvm']['logical_volume_name'] do
size node['ephemeral_lvm']['logical_volume_size']
filesystem node['ephemeral_lvm']['filesystem']
mount_point location: node['ephemeral_lvm']['mount_point'], options: ['defaults', 'noauto']
mount_point location: node['ephemeral_lvm']['mount_point'], options: ['defaults', 'noauto'], pass: 0
if ephemeral_devices.size > 1
stripes ephemeral_devices.size
stripe_size node['ephemeral_lvm']['stripe_size'].to_i
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/bats/verify_ephemeral.bats
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ export PATH=$PATH:/sbin:/usr/sbin
@test "ephemeral logical volume is mounted to /mnt/ephemeral" {
mountpoint /mnt/ephemeral
mount | grep "/dev/mapper/vg--data-ephemeral0 on /mnt/ephemeral type ext3"
grep -P "/dev/mapper/vg--data-ephemeral0\s+/mnt/ephemeral\s+ext3\s+defaults,noauto\s" /etc/fstab
grep -P "/dev/mapper/vg--data-ephemeral0\s+/mnt/ephemeral\s+ext3\s+defaults,noauto\s+0\s+0" /etc/fstab
}
3 changes: 1 addition & 2 deletions test/integration/gce/bats/verify_ephemeral.bats
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export PATH=$PATH:/sbin:/usr/sbin
lvs | grep vg-data | grep ephemeral0
}


# The `lvs --segments --separator :` command outputs in the following format
# 'LV:VG:Attr:#Str:Type:SSize' where '#Str' is the number of stripes and 'Type' is 'striped'
# if the LVM is striped and 'linear' otherwise.
Expand All @@ -34,5 +33,5 @@ export PATH=$PATH:/sbin:/usr/sbin
@test "ephemeral logical volume is mounted to /mnt/ephemeral" {
mountpoint /mnt/ephemeral
mount | grep "/dev/mapper/vg--data-ephemeral0 on /mnt/ephemeral type ext3"
grep -P "/dev/mapper/vg--data-ephemeral0\s+/mnt/ephemeral\s+ext3\s+defaults,noauto\s" /etc/fstab
grep -P "/dev/mapper/vg--data-ephemeral0\s+/mnt/ephemeral\s+ext3\s+defaults,noauto\s+0\s+0" /etc/fstab
}

0 comments on commit 9b02927

Please sign in to comment.