The elk role sets up the logstash-* index template, with number_of_replicas set to 0 (template). The cirrussearchrole's command for building the search index is conditioned on the is-cirrussearch-forceindex-needed succeeding (presumably to ward off some race condition?), which is a wrapper around the cirrusNeedsToBeBuilt.php maintenance script, which just polls the ElasticSearch health check until everything is green. Since the logstash indexes have no replicas, they return yellow, causing the script to hang and eventually time out, and so fail to build the index.
Customize query in gerrit
|mediawiki/extensions/CirrusSearch||master||+37 -1||cirrusNeedsToBeBuilt.php: filter health check to Cirrus indices|