Page MenuHomePhabricator

Puppet::Environments::EnvironmentNotFound after `vagrant provision` or `vagrant up`
Closed, DuplicatePublic

Description

Possibly related or duplicate of T193153.

Environment:

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G5019

$ vboxmanage --version
6.0.4r128413

$ vagrant -v
Vagrant 2.2.4

~/Documents/gerrit/mediawiki/vagrant$ git log -1
commit 3ffbc3d785e2c32819f5fd1653d1260d685b3541 (HEAD -> master, origin/master, origin/HEAD)
Author: Stephane Bisson <sbisson@wikimedia.org>
Date:   Mon Mar 4 10:37:20 2019 -0500

    Update growthexperiments role
    
    * Require pageviewinfo, it is now a dependency of the extension
    * Add missing help panel configuration
    * Enable homepage by default
    
    Change-Id: I1d47701b6b128c6a893a43466eeefe3678d4f815

Create a clean VM with no roles enabled

vagrant up

Enable, provision, disable, provision echo role.

vagrant roles enable echo
vagrant provision
vagrant roles reset
vagrant provision

Suspend the VM and log out from host machine.

vagrant suspend

Log in to host machine and try to provision echo role.

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'debian/contrib-stretch64' version '9.8.0' is up to date...
==> default: Resuming suspended VM...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Machine 'default' has a post `vagrant up` message. This is a message
==> default: from the creator of the Vagrantfile, and not from Vagrant itself:
==> default: 
==> default: Documentation: https://www.mediawiki.org/wiki/MediaWiki-Vagrant

$ vagrant roles enable echo
Ok. Run `vagrant provision` to apply your changes.

$ vagrant provision
==> default: Running provisioner: lsb_check...
==> default: Running provisioner: file_perms...
==> default: Running provisioner: shell...
    default: Running: /var/folders/rm/ygktgnp948b4pppthg0y6k040000gn/T/vagrant-shell20190306-6158-czb75u.sh
==> default: Running provisioner: puppet...
==> default: Running Puppet with environment vagrant...
==> default: /usr/lib/ruby/vendor_ruby/puppet/environments.rb:38:in `get!': Could not find a directory environment named 'vagrant' anywhere in the path: /vagrant/puppet/environments. Does the directory exist? (Puppet::Environments::EnvironmentNotFound)
==> default: 	from /usr/lib/ruby/vendor_ruby/puppet/application_support.rb:29:in `push_application_context'
==> default: 	from /usr/lib/ruby/vendor_ruby/puppet/application.rb:337:in `run'
==> default: 	from /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
==> default: 	from /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
==> default: 	from /usr/bin/puppet:5:in `<main>'
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.

The problem goes away after vagrant reload and vagrant provision.

Event Timeline

zeljkofilipin moved this task from Backlog 🪒 to Watching 📺 on the User-zeljkofilipin board.
zeljkofilipin updated the task description. (Show Details)
bd808 renamed this task from Puppet::Environments::EnvironmentNotFound after `vagrant provision` to Puppet::Environments::EnvironmentNotFound after `vagrant provision` or `vagrant up`.Apr 17 2019, 8:39 PM
bd808 added subscribers: Sebastian_Berlin-WMSE, Tgr.