8000 Provision action trigger ordering with provision action by anshulsharma-hashicorp · Pull Request #13690 · hashicorp/vagrant · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Provision action trigger ordering with provision action #13690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anshulsharma-hashicorp
Copy link

No description provided.

to perform their operation and call to the next item but in some cases will continue to
do things once the next item completes. In the Provision action, the next item in the
stack is executed [here](https://github.com/hashicorp/vagrant/blob/main/lib/vagrant/action/builtin/provision.rb#L82-L83).but the actual provisioning happens at the end [here](https://github.com/hashicorp/vagrant/blob/main/lib/vagrant/action/builtin/provision.rb#L129-L133), after the rest of the stack
has executed and exited.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be updated for grammar and clarity as it's mixing terms.

The provision action behaves slightly different than other actions. When Vagrant executes its stack, each action performs some function and then calls the next action in the stack. In some cases (like the provision action), the action will perform some function, call the next action, and wait for the it to return to perform some extra functionality or cleanup. This behavior can result in seemingly unexpected results for after triggers since the targeted action will complete after the rest of the actions in the stack have executed.

info: "INSIDE AFTER machine_action_provision HOOK TRIGGER"

end
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Output of this should be included to display the behavior.

```

When running `vagrant provision` or `vagrant up`, the before and after triggers
will run before the provisioning of the box happens.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this true?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0