diff options
author | antima-gupta <agupta@msystechnologies.com> | 2020-08-19 18:01:37 +0530 |
---|---|---|
committer | antima-gupta <agupta@msystechnologies.com> | 2020-08-27 14:10:18 +0530 |
commit | f9a0013089ce29f6ffb853f7303be61577bece32 (patch) | |
tree | 67150ca329a49ac3b07665be573c0faa1c53b7ed /kitchen-tests | |
parent | f05dc3618241eaac5755b9904fc9ceb43e59a455 (diff) | |
download | chef-f9a0013089ce29f6ffb853f7303be61577bece32.tar.gz |
Fixed mount Resource for bind mounts is not idempotent.
Added a separate linux mount provider.
Define 'mounted?' method and used 'findmnt -rn' command to list mount points along with device.
Added linux_mount recipe to kitchen-tests.
Signed-off-by: antima-gupta <agupta@msystechnologies.com>
Diffstat (limited to 'kitchen-tests')
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/recipes/_linux_mount.rb | 20 | ||||
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/recipes/linux.rb | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_linux_mount.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_linux_mount.rb new file mode 100644 index 0000000000..207ef9d1fb --- /dev/null +++ b/kitchen-tests/cookbooks/end_to_end/recipes/_linux_mount.rb @@ -0,0 +1,20 @@ +mount "/proc" do + device "proc" + fstype "proc" + options %w{bind rw} + action %i{ mount enable } +end + +mount "/mnt" do + device "/tmp" + fstype "ext4" + options %w{bind rw} + action %i{ mount enable } +end + +mount "/mnt" do + device "/etc" + fstype "ext4" + options %w{bind rw} + action %i{ mount enable } +end
\ No newline at end of file diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb index 8fae36662c..bb94fb88d1 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb @@ -122,6 +122,7 @@ include_recipe "::_cron" include_recipe "::_ohai_hint" include_recipe "::_openssl" include_recipe "::_tests" +include_recipe "::_linux_mount" # at the moment these do not run properly in docker # we need to investigate if this is a snap on docker issue or a chef issue |