Automatically enable Rugged feature flags if NFS is detected
Problem to solve
Performance issues have been identified when using GitLab with NFS in recent versions of GitLab. We have back ported patches which add back Rugged code to improve performance. However, these patches are behind a feature flag because in certain configurations this would be a breaking change.
- Come up with Gitaly code that safely creates a metafile on startup.
- Come up with a format for the metadata file (JSON? with just one field, "gitaly-filesystem-id")
- Come up with a way to ask a Gitaly server what the "filesystem ID of a storage" is. That means either creating a new RPC, or adding fields to an existing RPC. I think we might be able to squeeze this into some RPC that returns general information about the Gitaly server.
- Write code in gitlab-rails that reads the metadata file directly and compares it with that RPC
- Manually create such a metadata file and play around seeing if the detection works as expected