jenkins-bot has submitted this change and it was merged. Change subject: Removed ceph backend config for decommissioning ......................................................................
Removed ceph backend config for decommissioning * Also removed extra purge hook code related to using multiwrite backends Change-Id: I4d1253cc9e240682b44d40a0668d44c88bb8d07a --- M wmf-config/filebackend.php 1 file changed, 0 insertions(+), 99 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved Faidon Liambotis: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wmf-config/filebackend.php b/wmf-config/filebackend.php index 4ba64b2..d556e32 100644 --- a/wmf-config/filebackend.php +++ b/wmf-config/filebackend.php @@ -71,69 +71,6 @@ ); /* end Swift backend config */ -/* Ceph rados+rgw backend config */ -$wgFileBackends[] = array( // backend config for wiki's local repo - 'class' => 'SwiftFileBackend', - 'name' => 'local-ceph', - 'wikiId' => "{$site}-{$lang}", - 'lockManager' => 'nullLockManager', // LocalFile uses FOR UPDATE - 'fileJournal' => array( 'class' => 'DBFileJournal', 'wiki' => $wgDBname, 'ttlDays' => $wmfFileJournalTTL ), - 'swiftAuthUrl' => $wmfCephRgwConfig['authUrl'], - 'swiftUser' => $wmfCephRgwConfig['user'], - 'swiftKey' => $wmfCephRgwConfig['key'], - 'swiftTempUrlKey' => $wmfCephRgwConfig['tempUrlKey'], - 'rgwS3AccessKey' => $wmfCephRgwConfig['S3AccessKey'], - 'rgwS3SecretKey' => $wmfCephRgwConfig['S3SecretKey'], - 'shardViaHashLevels' => array( - 'local-public' => array( 'levels' => $wmfSwiftShardLocal, 'base' => 16, 'repeat' => 1 ), - 'local-thumb' => array( 'levels' => $wmfSwiftShardLocal, 'base' => 16, 'repeat' => 1 ), - 'local-temp' => array( 'levels' => $wmfSwiftShardLocal, 'base' => 16, 'repeat' => 1 ), - 'local-transcoded' => array( 'levels' => $wmfSwiftShardLocal, 'base' => 16, 'repeat' => 1 ), - 'local-deleted' => array( 'levels' => $wmfSwiftShardLocal, 'base' => 36, 'repeat' => 0 ) - ), - 'parallelize' => 'implicit', - 'cacheAuthInfo' => true -); -$wgFileBackends[] = array( // backend config for wiki's access to shared repo - 'class' => 'SwiftFileBackend', - 'name' => 'shared-ceph', - 'wikiId' => "wikipedia-commons", - 'lockManager' => 'nullLockManager', // just thumbnails - 'fileJournal' => array( 'class' => 'DBFileJournal', 'wiki' => 'commonswiki', 'ttlDays' => $wmfFileJournalTTL ), - 'swiftAuthUrl' => $wmfCephRgwConfig['authUrl'], - 'swiftUser' => $wmfCephRgwConfig['user'], - 'swiftKey' => $wmfCephRgwConfig['key'], - 'swiftTempUrlKey' => $wmfCephRgwConfig['tempUrlKey'], - 'rgwS3AccessKey' => $wmfCephRgwConfig['S3AccessKey'], - 'rgwS3SecretKey' => $wmfCephRgwConfig['S3SecretKey'], - 'shardViaHashLevels' => array( - 'local-public' => array( 'levels' => $wmfSwiftShardCommon, 'base' => 16, 'repeat' => 1 ), - 'local-thumb' => array( 'levels' => $wmfSwiftShardCommon, 'base' => 16, 'repeat' => 1 ), - 'local-temp' => array( 'levels' => $wmfSwiftShardCommon, 'base' => 16, 'repeat' => 1 ), - 'local-transcoded' => array( 'levels' => $wmfSwiftShardCommon, 'base' => 16, 'repeat' => 1 ), - ), - 'parallelize' => 'implicit', - 'cacheAuthInfo' => true -); -$wgFileBackends[] = array( // backend config for wiki's access to shared files - 'class' => 'SwiftFileBackend', - 'name' => 'global-ceph', - 'wikiId' => "global-data", - 'lockManager' => 'nullLockManager', - 'swiftAuthUrl' => $wmfCephRgwConfig['authUrl'], - 'swiftUser' => $wmfCephRgwConfig['user'], - 'swiftKey' => $wmfCephRgwConfig['key'], - 'swiftTempUrlKey' => $wmfCephRgwConfig['tempUrlKey'], - 'rgwS3AccessKey' => $wmfCephRgwConfig['S3AccessKey'], - 'rgwS3SecretKey' => $wmfCephRgwConfig['S3SecretKey'], - 'shardViaHashLevels' => array( - 'math-render' => array( 'levels' => 2, 'base' => 16, 'repeat' => 0 ), - ), - 'parallelize' => 'implicit', - 'cacheAuthInfo' => true -); -/* end Ceph rados+rgw backend config */ - /* Multiwrite backend config */ $wgFileBackends[] = array( 'class' => 'FileBackendMultiWrite', @@ -144,7 +81,6 @@ 'backends' => array( # DO NOT change the master backend unless it is fully trusted or autoRsync is off array( 'template' => 'local-swift', 'isMultiMaster' => true ), - array( 'template' => 'local-ceph', 'isMultiMaster' => false ) ), 'syncChecks' => ( 1 | 4 ), // (size & sha1) 'autoResync' => 'conservative' // bug 39221 @@ -158,7 +94,6 @@ 'backends' => array( # DO NOT change the master backend unless it is fully trusted or autoRsync is off array( 'template' => 'shared-swift', 'isMultiMaster' => true ), - array( 'template' => 'shared-ceph', 'isMultiMaster' => false ) ), 'syncChecks' => ( 1 | 4 ), // (size & sha1) 'autoResync' => 'conservative' // bug 39221 @@ -219,37 +154,3 @@ 'abbrvThreshold' => 160 ); } - -// Make sure any thumbnails in swift but not ceph have the CDN get purged -$wgHooks['LocalFilePurgeThumbnails'][] = function( File $file, $archiveName ) { - global $site, $lang; - - $backend = FileBackendGroup::singleton()->get( 'local-swift' ); - // Get thumbnail dir relative to thumb zone - if ( $archiveName !== false ) { - $thumbRel = $file->getArchiveThumbRel( $archiveName ); // old version - } else { - $thumbRel = $file->getRel(); // current version - } - $thumbDir = $backend->getRootStoragePath() . "/local-thumb/$thumbRel"; - - $list = $backend->getFileList( array( 'dir' => $thumbDir ) ); - if ( $list === null ) { - wfDebugLog( 'SwiftBackend', "Could not get thumbnail listing." . - "Site: `{$site}` Lang: `{$lang}` ThumbRel: `{$thumbRel}/`" ); - } else { - $urls = array(); - wfProfileIn( __METHOD__ . '-list' ); - foreach ( $list as $relFile ) { - $urls[] = ( $archiveName !== false ) - ? $file->getArchiveThumbUrl( $archiveName, $relFile ) - : $file->getThumbUrl( $relFile ); - } - wfProfileOut( __METHOD__ . '-list' ); - wfProfileIn( __METHOD__ . '-purge' ); - SquidUpdate::purge( $urls ); - wfProfileOut( __METHOD__ . '-purge' ); - } - - return true; -}; -- To view, visit https://gerrit.wikimedia.org/r/83761 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4d1253cc9e240682b44d40a0668d44c88bb8d07a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Faidon Liambotis <fai...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits