After pulling up a new VM and enabling the cirrussearch role, the maintenance scripts on all wikis fail with an error message that says Elasticsearch 2.x is expected and 1.7.3 is installed.
the problem is we havn't been able to put the new version of elasticsearch into wikimedia apt repositories. It doesn't support multiple versions of the same package and the old version is still being used in production. As temporary workaround you can grab the elasticsearch package from elastic.co and use sudo dpkg -i elasticsearch-2.3.3.deb
Caused by rMWVA8371db5fb261: Upgrade to elastic 2.3.3 which forced the version to a version not available in MediaWiki's apt repo. That patch probably should not have been merged. Hopefully we are just a few days away from resolving T136001: [EPIC] Upgrade elasticsearch cluster supporting logging to 2.3 which should unblock updating the apt repo.
that patch was merged because CirrusSearch requires elasticsearch 2 now, so it was broken either way. Either it fails due to the elasticsearch version not being accepted by the cirrus maintenance scripts, or it fails because it tries to install an unavailable elasticsearch .deb, either way its broken and this is closer to being fixed.
This now breaks any time the wikimedia apt repo and the vagrant version are not in sync. E.g. right now the apt repo is at 2.4.2 so when provisioning I get
==> default: Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install elasticsearch=2.3.5' returned 100: Reading package lists... ==> default: Building dependency tree... ==> default: Reading state information... ==> default: E: Version '2.3.5' for 'elasticsearch' was not found
Is there really a need for the vagrant role to specify the version number?
I'm not aware that we upgraded to 2.4.2, we haven't released our elasticsearch plugins for 2.4.2.
The reason we need to specify the version number here is that the script to install plugins requires the version number. And I did not find a way to extract this information from puppet without specifying the version value manually.
The patch above makes provisioning work again for me. My apt knowledge is very limited but https://apt.wikimedia.org/wikimedia/dists/trusty-wikimedia/thirdparty/binary-amd64/Packages seems to be the thing to look at, and that refers to 2.4.2.
If you need the version number in puppet, maybe you can set it to ensure=latest, and write a facter check for what that is (I think it can be looked up via apt-cache policy)?