BigW Consortium Gitlab

Commit 9be17322 by Pawel Chojnacki

add comment explaining use of shell commands and file operations in the same methods

parent 6ac0a142
...@@ -77,6 +77,13 @@ module Gitlab ...@@ -77,6 +77,13 @@ module Gitlab
storages_paths&.dig(storage_name, 'path') storages_paths&.dig(storage_name, 'path')
end end
# All below test methods use shell commands to perform actions on storage volumes.
# In case a storage volume have connectivity problems causing pure Ruby IO operation to wait indefinitely,
# we can rely on shell commands to be terminated once `timeout` kills them.
#
# However we also fallback to pure Ruby file operations in case a specific shell command is missing
# so we are still able to perform healthchecks and gather metrics from such system.
def delete_test_file(tmp_path) def delete_test_file(tmp_path)
_, status = exec_with_timeout(%W{ rm -f #{tmp_path} }) _, status = exec_with_timeout(%W{ rm -f #{tmp_path} })
status.zero? status.zero?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment