From: Walter Huf Date: Wed, 3 Sep 2014 21:36:11 +0000 (-0500) Subject: Adds _netdev for fuse mounts in fstab X-Git-Tag: v0.8.0~22^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F144%2Fhead;p=ceph-cookbooks.git Adds _netdev for fuse mounts in fstab --- diff --git a/providers/cephfs.rb b/providers/cephfs.rb index 7396183..a781f5b 100644 --- a/providers/cephfs.rb +++ b/providers/cephfs.rb @@ -25,7 +25,7 @@ def manage_mount(directory, subdir, use_fuse, action) fstype 'fuse.ceph' # needs two slashes to indicate a network mount to chef device "conf=//etc/ceph/ceph.conf,id=#{client_name},keyfile=#{filename}" - options 'defaults' + options 'defaults,_netdev' dump 0 pass 0 action action diff --git a/test/cookbooks/ceph_test/recipes/cephfs.rb b/test/cookbooks/ceph_test/recipes/cephfs.rb index 3ad328b..c4589a8 100644 --- a/test/cookbooks/ceph_test/recipes/cephfs.rb +++ b/test/cookbooks/ceph_test/recipes/cephfs.rb @@ -39,6 +39,10 @@ ceph_cephfs '/ceph.fuse' do use_fuse true action [:mount] end +ceph_cephfs '/ceph.fstab' do + use_fuse true + action [:mount, :enable] +end directory '/ceph/subdir' file '/ceph/subdir/file' do content "It works\n" diff --git a/test/integration/aio/bats/cephfs.bats b/test/integration/aio/bats/cephfs.bats index 8dd3cbe..b5d2a99 100644 --- a/test/integration/aio/bats/cephfs.bats +++ b/test/integration/aio/bats/cephfs.bats @@ -8,13 +8,19 @@ @test "/ceph.fuse is mounted" { grep -q -E '^\S+\s+/ceph\.fuse\s+fuse' /proc/mounts } +@test "/ceph.fstab is mounted" { + grep -q -E '^\S+\s+/ceph\.fstab\s+fuse' /proc/mounts +} @test "/ceph is in fstab" { - grep -q -E '^\S+\s+/ceph\s+' /etc/fstab + grep -q -E '^\S+\s+/ceph\s+\S+\s+\S*_netdev\S*\s' /etc/fstab } @test "/ceph.fuse is NOT in fstab" { grep -v -q -E '^\S+\s+/ceph.fuse\s+' /etc/fstab } +@test "/ceph.fstab is in fstab" { + grep -q -E '^\S+\s+/ceph.fstab\s+\S+\s+\S*_netdev\S*\s' /etc/fstab +} @test "test file exists in /ceph" { test -e /ceph/subdir/file