Page MenuHomePhabricator

scap clean not removing staging dirs
Closed, ResolvedPublic

Description

Attempted to remove 1.29.0-wmf.9 as part of train. Ran scap clean 1.29.0-wmf.9. I suppose the branch was already removed so I got a bunch of Failed to prune submodule branch for [whatever] but I also got a ton of:

rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/image-ltr-progressive.png’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/code.png’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/key-ltr-invert.png’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/subscript-rtl-progressive.png’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/caret-ltr-invert.svg’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/stripeSummary-rtl-progressive.svg’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/table-progressive.svg’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/case-sensitive-invert.png’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/download-rtl.svg’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/unBlock-rtl.svg’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/italic-a.svg’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/clear-invert.png’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/upload-rtl-progressive.svg’: Permission denied
rm: cannot remove ‘/srv/mediawiki-staging/php-1.29.0-wmf.9/resources/lib/oojs-ui/themes/mediawiki/images/icons/move-rtl-progressive.png’: Permission denied

etc.

The directory is removed on apaches and in /srv/mediawiki but is not removed in the staging directory either on tin or on mira

Event Timeline

I suppose the branch was already removed so I got a bunch of Failed to prune submodule branch for [whatever]

Nope, they were not pruned yet...when I just ran it for wmf.10, it worked fine. Permissions error on Gerrit?

As far as the permission denied bits...there's two issues here

  • l10nupdate cache is owned by www-data: fixed in https://gerrit.wikimedia.org/r/#/c/346325/
  • Actual files in the branch should be owned by whoever checked them out / edited them last. I can delete any one of those files singularly as myself. Are we running as mwdeploy perhaps?

I suppose the branch was already removed so I got a bunch of Failed to prune submodule branch for [whatever]

Nope, they were not pruned yet...when I just ran it for wmf.10, it worked fine. Permissions error on Gerrit?

Ah, they might have been! The script doesn't handle multiple runs well--could be leftovers from a prior failed week?

Change 346330 had a related patch set uploaded (by Chad):
[operations/mediawiki-config@master] scap clean: Only prune staging files from the active master

https://gerrit.wikimedia.org/r/346330

Change 346330 merged by jenkins-bot:
[operations/mediawiki-config@master] scap clean: Only prune staging files from the active master

https://gerrit.wikimedia.org/r/346330

demon claimed this task.

Fixed this up. It's still a little wonky on repeated runs, but that's minor