Page MenuHomePhabricator

Static server returns HTTP 403 Forbidden for valid files in some cases
Closed, ResolvedPublic

Description

The static server often returns HTTP 403 Forbidden for files recently updated from Git. This seems to be an NFS issue based on discussion with valhallasw in Cloud-Services.

Known facts:

  • This happens even if I break the symlink from ~/www/static to the git repository before updating.
  • This happens very reliably, but only for modified files. (Updating the repository doesn't break files that didn't change.)
  • The 403 seems to be cached on the server; after renaming the file, the new name works fine but the old name keeps returning 403 (even though it's not there anymore).
  • This seems to last for quite a while (5+ hours) until it starts the serving the file.
  • Remounting the NFS share on the static server solves the problem temporarily (including preventing further occurrences), but it eventually started happening again.

When I renamed an affected file (so both names below should return 'no such file'), valhallasw noticed this behaviour from the static server accessing the NFS share:

valhallasw@tools-web-static-01:/data/project/meta/www/static/scripts/edge$ cat pathoschild.regexeditor.css
cat: pathoschild.regexeditor.css: Permission denied
valhallasw@tools-web-static-01:/data/project/meta/www/static/scripts/edge$ cat pathoschild.regexeditor.csss
cat: pathoschild.regexeditor.csss: No such file or directory

Repro steps:

  1. Become a Tool Labs project.
  2. Clone a git repository containing CSS/JS files to ~/git/<repo>.
  3. Symlink ~/www/static/<repo> to ~/git/<repo>.
  4. View one of the files via tools-static.wmflabs.org/<project name>/<repo>/<filename> (you should get HTTP 200 OK).
  5. Perform an upstream change to one of the files.
  6. Update the git repo (git pull).
  7. View the same file via tools-static.wmflabs.org (you should get HTTP 403 Forbidden).

Event Timeline

Pathoschild raised the priority of this task from to Needs Triage.
Pathoschild updated the task description. (Show Details)
Pathoschild added a project: Toolforge.
Pathoschild subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
valhallasw subscribed.

@coren: Assuming this is the attribute cache issue of T106170, we would need to reboot the servers tools-web-static-01 and tools-web-static-02 to resolve this?

This requires reproduction this year. It could be fixed. It might not be.

Bstorm changed the task status from Open to Stalled.Feb 25 2020, 8:10 PM

I don't change scripts on Toolforge much anymore, but I don't see any recent reports/comments about the issue so it's probably safe to close this.

Andrew claimed this task.
Andrew subscribed.

Feel free to reopen if this issue appears again.