Page MenuHomePhabricator

beta cluster: Warning: failed to mkdir "/srv/mediawiki/php-master/images/thumb/...
Closed, ResolvedPublic

Description

The beta cluster Mediawiki servers are trying to create thumbnails locally under /srv/mediawiki/php-master/images/thumb/.

Warning: failed to mkdir "/srv/mediawiki/php-master/images/thumb/

Apparently been going on for ages. With a huge spike on August 31 from 16:50 to 18:30.

Looks like the filebackend is not properly configured on beta.

Event Timeline

$fbg = FileBackendGroup::singleton();
$rf = new ReflectionProperty( 'FileBackendGroup', 'backends' );
$rf->setAccessible( true );
=$rf->getValue( $fbg );

Shows where this comes from:

[wikimediacommons-backend] => Array
    (
        [class] => "FSFileBackend"
        [config] => Array
            (
                [name] => "wikimediacommons-backend"
                [lockManager] => "fsLockManager"
                [containerPaths] => Array
                    (
                        [wikimediacommons-public] => "/srv/mediawiki/php-master/images"
                        [wikimediacommons-thumb] => "/srv/mediawiki/php-master/images/thumb"
                        [wikimediacommons-transcoded] => "/srv/mediawiki/php-master/images/transcoded"
                        [wikimediacommons-deleted] => false
                        [wikimediacommons-temp] => "/srv/mediawiki/php-master/images/temp"
                    )

                [fileMode] => 420
                [readOnly] => false
            )

        [instance] => null
    )

InstantCommons.

hashar triaged this task as High priority.Sep 26 2016, 9:59 AM

What would be the correct directory to use?

The wikimediacommons-backend is created by Setup.php, I guess it should be overridden to use a SwiftFileBackend. Probably want to define a new file backends similar to the one for commons:

$wgFileBackends[] = [ // backend config for wiki's access to shared repo
    'class'              => 'SwiftFileBackend',
    'name'               => "shared-swift-eqiad",
    'wikiId'             => "wikipedia-commons",
    'lockManager'        => 'redisLockManager',

Then the file backend terribly confuses me :-/

How are you planning to use SwiftFileBackend against actual commons from outside production?

Production Commons is a ForeignApiRepo in beta so the file backend is only touched when looking for thumbs AIUI.

Change 334178 had a related patch set uploaded (by Gergő Tisza):
Set up a Swift backend for prod Commons thumbnails on beta

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

Change 334178 abandoned by Gergő Tisza:
Set up a Swift backend for prod Commons thumbnails on beta

Reason:
On second thought, probably not needed.

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

Change 334181 had a related patch set uploaded (by Gergő Tisza):
InstantCommons: do not cache thumbs

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

Change 334181 merged by jenkins-bot:
InstantCommons: do not cache thumbs

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

Tgr claimed this task.

Per logstash this seems fixed.

Change 336674 had a related patch set uploaded (by Gergő Tisza):
InstantCommons: do not cache thumbs

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

Change 336675 had a related patch set uploaded (by Gergő Tisza):
InstantCommons: do not cache thumbs

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

Change 336674 merged by jenkins-bot:
InstantCommons: do not cache thumbs

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

Change 336675 merged by jenkins-bot:
InstantCommons: do not cache thumbs

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