summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2021-02-12 14:58:24 -0800
committerGitHub <noreply@github.com>2021-02-12 14:58:24 -0800
commit200b8e74c5eefe56b1a943c22b79af276c146afb (patch)
treeaae7c535b1aa91b476f7582fd6e63b0b7d00d89d
parent8aa08bb1c88cb855e69edcb665888e6e8c9ee57d (diff)
parent3ca53d4c6d412a6cc11892357867889e0f5ac89b (diff)
downloadchef-200b8e74c5eefe56b1a943c22b79af276c146afb.tar.gz
Merge pull request #11031 from ramereth/issue-10764
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/provider/mount/mount.rb2
-rw-r--r--spec/unit/provider/mount/mount_spec.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/mount/mount.rb b/lib/chef/provider/mount/mount.rb
index 0bd81d5453..12406b7f47 100644
--- a/lib/chef/provider/mount/mount.rb
+++ b/lib/chef/provider/mount/mount.rb
@@ -203,7 +203,7 @@ class Chef
end
end
# Removed "/" from the end of str, because it was causing idempotency issue.
- @real_device == "/" ? @real_device : @real_device.chomp("/")
+ (@real_device == "/" || @real_device.match?(":/$")) ? @real_device : @real_device.chomp("/")
end
def device_logstring
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