From 3ca53d4c6d412a6cc11892357867889e0f5ac89b Mon Sep 17 00:00:00 2001 From: Lance Albertson Date: Fri, 12 Feb 2021 11:06:56 -0800 Subject: Fix network mounts which use the root level as the device PR #10614 introduce a bug which can impact network mounts which try to mount from the root level (i.e. server:/). Specifically, we run into this on cephfs where this is pretty common. This adds some logic to detect if this is a network mount at the root level and doesn't strip the '/'. This resolves #10764. Signed-off-by: Lance Albertson --- spec/unit/provider/mount/mount_spec.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'spec') diff --git a/spec/unit/provider/mount/mount_spec.rb b/spec/unit/provider/mount/mount_spec.rb index 9a7d9198b5..015e0038c8 100644 --- a/spec/unit/provider/mount/mount_spec.rb +++ b/spec/unit/provider/mount/mount_spec.rb @@ -66,6 +66,7 @@ describe Chef::Provider::Mount::Mount do describe "when dealing with network mounts" do { "nfs" => "nfsserver:/vol/path", + "cephfs" => "cephserver:6789:/", "cifs" => "//cifsserver/share" }.each do |type, fs_spec| it "should detect network fs_spec (#{type})" do @new_resource.device fs_spec -- cgit v1.2.1