LFS files can't download from Geo secondary due to read-only middleware
Zendesk: https://gitlab.zendesk.com/agent/tickets/81639
Attempting to pull LFS files from the secondary results in "batch response: too many redirects".
The reason? The LFS API uses POST to download files in bulk. Unfortunately, we can't distinguish between a push or pull just from the API call from the Geo middleware. You can replicate this easily in a Rails console:
irb(main):035:0> app.post '/root/rouge.git/info/lfs/objects/batch'
Started POST "/root/rouge.git/info/lfs/objects/batch" for 127.0.0.1 at 2017-08-24 00:34:12 +0000
GitLab Geo: preventing possible non readonly operation
=> 301
The 301 causes the LFS client to redirect to /
, and the transfer fails after several attempts.
Edited by Stan Hu