Page MenuHomePhabricator

Explicitly enabling and provisioning the cirrussearch role nukes the VM
Open, MediumPublicBUG REPORT

Description

Explicitly enabling and provisioning the cirrussearch role in my local (LXC-based) setup leads to Vagrant no longer being able to boot the instance, and the instance appearing as "not created" with vagrant status:

mholloway@mholloway:~/code/wikimedia$ git clone ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant cirrus2-vagrant
Cloning into 'cirrus2-vagrant'...
remote: Counting objects: 2147, done
remote: Finding sources: 100% (13/13)
remote: Getting sizes: 100% (11/11)
remote: Compressing objects: 100% (33408/33408)
remote: Total 24635 (delta 4), reused 24624 (delta 0)
Receiving objects: 100% (24635/24635), 3.59 MiB | 7.71 MiB/s, done.
Resolving deltas: 100% (17863/17863), done.
mholloway@mholloway:~/code/wikimedia$ cd cirrus2-vagrant/
mholloway@mholloway:~/code/wikimedia/cirrus2-vagrant$ ./setup.sh
Your git/Gerrit username
Enter 'anonymous' for anonymous access, leave blank to manage it yourself
git_user: mholloway


You're all set! Simply run `vagrant up` to boot your new environment.
(Or try `vagrant config --list` to see what else you can tweak.)
mholloway@mholloway:~/code/wikimedia/cirrus2-vagrant$ vagrant roles enable cirrussearch
Ok. Run `vagrant provision` to apply your changes.

Note the following settings have changed and your environment will be reloaded.
vagrant_ram: 1536 -> 2048
mholloway@mholloway:~/code/wikimedia/cirrus2-vagrant$ vagrant up
Bringing machine 'default' up with 'lxc' provider...
==> default: Importing base box 'debian/stretch64'...
==> default: Checking if box 'debian/stretch64' version '9.1.0' is up to date...
==> default: Pruning invalid NFS exports. Administrator privileges will be required...
[sudo] password for mholloway: 
==> default: Starting container...
There was an error executing ["sudo", "/usr/local/bin/vagrant-lxc-wrapper", "lxc-start", "-d", "--name", "cirrus2-vagrant_default_1571265688111_82030"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
mholloway@mholloway:~/code/wikimedia/cirrus2-vagrant$ vagrant status
Current machine states:

default                   not created (lxc)

The environment has not yet been created. Run `vagrant up` to
create the environment. If a machine is not created, only the
default provider will be shown. So if a provider is not listed,
then the machine is not created for that environment.

This occurs regardless of whether the role was enabled before or after the initial vagrant up, and regardless of whether other roles have been applied first.

Interestingly, if the cirrussearch role is pulled in indirectly, as a dependency of another role (for example, wikibasecirrussearch), there is no problem.

Misc. data:

Vagrant version: 2.2.5
Provider: LXC
Vagrant-LXC plugin version: 1.4.3

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Unfortunately I'm not sure. I recently switched my local development environment back to virtualbox from lxc due to unrelated issues. In general it should work though, we use mwv through lxc on cloud for our browser testing bot. There is one hack in the Vagrantfile related to cirrussearch+lxc, but it's been so long i forget why:

https://github.com/wikimedia/mediawiki-vagrant/blob/2adc4540dfb9aac1182f72c12609a688e2dcf7d5/Vagrantfile#L222

if mwv.roles_enabled.include?('cirrussearch')
  lxc.customize 'aa_profile', 'unconfined'
end
Gehel lowered the priority of this task from High to Medium.Aug 28 2020, 8:38 AM
Gehel moved this task from elastic / cirrus to Bugs on the Discovery-Search board.