Last modified: 2014-04-15 16:38:22 UTC
Centos 6.5 in VirtualBox on Windows 7 Mediawiki 1.23wmf10 ElasticSearch 1.0.1 CirrusSearch hash 74ff50f Testing on VM prior to deployment on live server. Newly rebuilt VM. Running updateSearchIndexConfig.php as part of install. Tried all suggested options. Output: ~> php updateSearchIndexConfig.php content index... Fetching Elasticsearch version...1.0.1...ok Infering index identifier...uswinewiki_content_ Index exists so validating... Validating number of shards...is 5 but should be 4...cannot correct! Number of shards is incorrect and cannot be changed without a rebuild. You can solve this problem by running this program again with either --startOver or --reindexAndRemoveOk. Make sure you understand the consequences of either choice.. This script will now continue to validate everything else. ~> php updateSearchIndexConfig.php --startOver content index... Fetching Elasticsearch version...1.0.1...ok Infering index identifier...uswinewiki_content_ Blowing away index to start over...ok Validating analyzers...ok Validating mappings... Validating mapping for page type...different...corrected Validating aliases... Validating content alias...is an index...Unexpected Elasticsearch failure. Elasticsearch failed in an unexpected way. This is always a bug in CirrusSearch. Error type: Elastica\Exception\ResponseException Message: IndexMissingException[[uswinewiki] missing] Trace: #0 /var/www/html/extensions_dist/Elastica/Elastica/lib/Elastica/Request.php(166): Elastica\Transport\Http->exec(Object(Elastica\Request), Array) #1 /var/www/html/extensions_dist/Elastica/Elastica/lib/Elastica/Client.php(587): Elastica\Request->send() #2 /var/www/html/extensions_dist/Elastica/Elastica/lib/Elastica/Index.php(440): Elastica\Client->request('uswinewiki/', 'DELETE', Array, Array) #3 /var/www/html/extensions_dist/Elastica/Elastica/lib/Elastica/Index.php(153): Elastica\Index->request('', 'DELETE') #4 /var/www/html/extensions_dist/CirrusSearch/maintenance/updateOneSearchIndexConfig.php(451): Elastica\Index->delete() #5 /var/www/html/extensions_dist/CirrusSearch/maintenance/updateOneSearchIndexConfig.php(432): CirrusSearch\UpdateOneSearchIndexConfig- >validateSpecificAlias() #6 /var/www/html/extensions_dist/CirrusSearch/maintenance/updateOneSearchIndexConfig.php(201): CirrusSearch\UpdateOneSearchIndexConfig- >validateAlias() #7 /var/www/html/extensions_dist/CirrusSearch/maintenance/updateSearchIndexConfig.php(50): CirrusSearch\UpdateOneSearchIndexConfig- >execute() #8 /var/www/html/w/maintenance/doMaintenance.php(104): CirrusSearch\UpdateSearchIndexConfig->execute() #9 /var/www/html/extensions_dist/CirrusSearch/maintenance/updateSearchIndexConfig.php(56): require_once('/var/www/html/w...') #10 {main} ~> php updateSearchIndexConfig.php --reindexAndRemoveOK content index... Fetching Elasticsearch version...1.0.1...ok Infering index identifier...uswinewiki_content_ Index exists so validating... Validating number of shards...ok Validating number of replicas...ok Validating analyzers...ok Validating mappings... Validating mapping for page type...ok Validating aliases... Validating content alias...is an index...cannot correct! There is currently an index with the name of the alias. Rerun this script with --startOver and it'll remove the index and continue.
That last error claims that you have a index named "uswinewiki_content". If that is the case nuke it with curl -XDELETE http://localhost:9200/uswinewiki_content and try again. If that fixes it for you I'll add some code around that case.
I nuked that one, then another that popped up (uswinewiki_general). I had to use --startOver, and then it looked like the update succeeded. ~> php updateSearchIndexConfig.php --startOver content index... Fetching Elasticsearch version...1.0.1...ok Infering index identifier...uswinewiki_content_first Blowing away index to start over...ok Validating analyzers...ok Validating mappings... Validating mapping for page type...different...corrected Validating aliases... Validating content alias...alias is free...corrected Validating all alias...alias not already assigned to this index...corrected Updating tracking indexes...done general index... Fetching Elasticsearch version...1.0.1...ok Infering index identifier...uswinewiki_general_first Blowing away index to start over...ok Validating analyzers...ok Validating mappings... Validating mapping for page type...different...corrected Validating aliases... Validating general alias...alias is free...corrected Validating all alias...alias not already assigned to this index...corrected Updating tracking indexes...done Thanks.
Change 125295 had a related patch set uploaded by Manybubbles: Fix maintenance script when index has the alias https://gerrit.wikimedia.org/r/125295
Change 125295 merged by jenkins-bot: Fix maintenance script when index has the alias https://gerrit.wikimedia.org/r/125295