Page MenuHomePhabricator

Vagrant initial provision fails on NodeJS version mismatch
Closed, ResolvedPublic3 Estimated Story Points

Description

==> default: Running provisioner: puppet...
==> default: Running Puppet with environment vagrant...
==> default: Info: Loading facts
==> default: Error: Evaluation Error: Error while evaluating a Function Call, eventgate requires NodeJS version 10 but was 6. Set npm::node_version: 10 in hieradata/common.yaml at /vagrant/puppet/modules/eventgate/manifests/init.pp:23:9 on node vagrant.mediawiki-vagrant.dev
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Event Timeline

Okay, I did a full re-initialization of vagrant, and this error didn't come up until I did role enable visualeditor. So one of the dependencies there is, I guess, not configured correctly?

Ah hm. @Pchelolo does visualeditor require eventbus? I guess for restbase/changeprop stuff?

The visualeditor role requires the restbase role which requires eventbus.

Let's see... doing exactly-what-the-error-message-says and adding the npm::node_version: 10 to hieradata/common.yaml gets through with no errors after only a few runs of provision.

Does leave me with a different service-error, which is what I was originally doing this rebuilding to see if a fresh VM would fix it, but... progress. I'll go make a different task for that (T218275).

Let's see... doing exactly-what-the-error-message-says and adding the npm::node_version: 10 to hieradata/common.yaml gets through with no errors after only a few runs of provision.

Does leave me with a different service-error, which is what I was originally doing this rebuilding to see if a fresh VM would fix it, but... progress. I'll go make a different task for that (T218275).

I've tried the same and get

Error: Evaluation Error: Error while evaluating a Function Call, eventgate requires NodeJS version 10 but was 10. Set npm::node_version: 10 in hieradata/common.yaml at /vagrant/puppet/modules/eventgate/manifests/init.pp:23:9 on node vagrant.mediawiki-vagrant.dev

Running provision doesn't seem to work for me. I've tried destroying the machine as well but still no luck. Disabling the VE role as above stops the error.

So this problem is due to the fact that some node services aren't yet compatible (or haven't been checked for compatibility) for node 10. EventGate (which will eventually be replacing EventLogging (which includes service eventbus) requires node 10.

For now I will add a conditional include for eventgate in the eventbus role. It isn't strictly needed yet, and could be enabled with an optional hiera setting.

In the long term node services need to be updated to work with node 10, and mw-vagrant should use node 10 by default.

I'm having the same error. Thanks for taking a look!

Milimetric added a project: Analytics-Kanban.
Milimetric moved this task from Incoming to Event Platform on the Analytics board.

Change 498969 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[mediawiki/vagrant@master] Only conditionally include eventgate service

https://gerrit.wikimedia.org/r/498969

Change 498969 merged by Ottomata:
[mediawiki/vagrant@master] Conditionally include eventgate module; configure api-request for eventgate

https://gerrit.wikimedia.org/r/498969

I've merged a patch that should avoid this problem. Let me know if it works for yall or not. Thanks!

A provision does seem to mostly work now... or didn't abort early, at least. Eventgate did throw out a bunch of errors when trying to build its node-rdkafka dependency, which can be seen in P8291 if you're curious.

Overall: VM works now for me.

Aye, yeah that's normal. That's node-rdkafka compiling generating compiler warnings.

Nuria set the point value for this task to 3.Mar 29 2019, 2:57 PM