Open luispabon opened 2 years ago
Hey there, dependency provisioning is an experimental feature. In order to use it you must enable experimental mode. If the problem persists after that has been enabled, could you provide a debug log.
Cheers!
Thank you @soapy1
Indeed the problem seems to persist. I upgraded to the very latest vagrant available on Hashicorp's Ubuntu repos (2.2.18), set VAGRANT_EXPERIMENTAL=dependency_provisioners
then re-created the machine from scratch and gathered logs for the first vagrant up
, and also vagrant provision
and vagrant reload --provision
.
The vagrant setup lives here (notice the branch): https://github.com/phpdocker-io/vagrant-docker/tree/provisioner-fix
Log files (generated with 2.2.18):
Hi @soapy1 and @luispabon
Any updates on this? I am trying to write an action trigger like so:
config.trigger.before :"Vagrant::Action::Builtin::Provision", type: :action do |trigger|
that runs on vagrant up
. It doesn't run on vagrant up
nor does it run on vagrant up --provision
, so @luispabon's workaround in https://github.com/phpdocker-io/vagrant-docker/commit/602949872c50c280b032565c7844720357131a69 doesn't work for me.
Hitting the same issue as @sam-xif, I would really like to be able to have a trigger that works before the provision action so it will work as expected on vagrant up --provision
and not just vagrant provision
.
Vagrant version
2.2.92.2.18Host operating system
Ubuntu 21.04
Guest operating system
Ubuntu 20.04
Vagrantfile
Here's a live example you can checkout https://github.com/phpdocker-io/vagrant-docker/tree/provisioner-fix (note the branch to checkout is
provisioner-fix
notmain
). Make sure youln -s config.yaml.dist config.yaml
or the loop where the trigger is won't have any data to loop through.Debug output
Note the lack of output after![image](https://user-images.githubusercontent.com/6388823/132548078-480e27ed-a48a-4f82-9fa4-4477c86873f9.png)
Running trigger
. It should look likeExpected behavior
Vagrant runs the
make init-services-hostnames ...
command on the host computerActual behavior
Nothing happens. Running on the
:provision
action, instead of the builtin class on the example above, works but partially - it won't run on the firstvagrant up
orvagrant reload --provision
. The objective is to run that command before provisioning, regardless of how the provisioning is triggered.Steps to reproduce
vagrant up
orvagrant provision
orvagrant reload --provision
References
n/a