Skip to content
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

Vagrant provision order #87

Closed
Temikus opened this issue Jul 13, 2015 · 3 comments
Closed

Vagrant provision order #87

Temikus opened this issue Jul 13, 2015 · 3 comments

Comments

@Temikus
Copy link
Collaborator

Temikus commented Jul 13, 2015

We currently have the following Provision action:

      # This action is called when `vagrant provision` is called.
      def self.action_provision
        Vagrant::Action::Builder.new.tap do |b|
          b.use ConfigValidate
          b.use Call, IsCreated do |env, b2|
            if !env[:result]
              b2.use MessageNotCreated
              next
            end

            b2.use Provision
            b2.use SyncedFolders
          end
        end
      end

Logic seems a bit weird, since it syncs the folders only after the provision.
Need to check:

  • The step order to make sure we can actually provision with a changed script.
  • Whether SyncedFolders action is actually needed, since vagrant-aws for example, got rid of theirs:
    mitchellh/vagrant-aws@df57c6a
@Temikus
Copy link
Collaborator Author

Temikus commented Jul 13, 2015

"The rsync and rsync-auto commands can be used to force a resync and to automatically resync when changes occur in the filesystem. Without running these commands, Vagrant only syncs the folders on vagrant up or vagrant reload."
This means that to comply to the provider standard, we need to remove the SyncedFolders action from provision altogether.
However, this is not fun for people testing, since this will mean that one needs to run rsync-auto before provisioning or vagrant rsync && vagrant provision every time. There are issues about it:
hashicorp/vagrant#5850
berkshelf/vagrant-berkshelf#281
berkshelf/vagrant-berkshelf#284
mitchellh/vagrant-aws#385

/CC @erjohnso
Eric, what do you think? I see to options (leaning towards the second one):

  • Comply with provider standard and wait until --rsync (see above) is implemented?
  • Put the SyncedFolders before Provision for the time being, risking slight non-compliance?

@Temikus
Copy link
Collaborator Author

Temikus commented Sep 21, 2015

Okay, looks like this needs to be figured out with upstream first, see last comment in: mitchellh/vagrant-aws#385

#347 may need to be reverted as this is is major regression in relied upon behavior, regardless of what the docs have claimed.. Current master seriously breaks the work-flow with the puppet provisioner and related plugins such as vagrant-librarian-puppet. Prior to #347, all that was requires was to run vagrant provision . Post, you have to run vagrant provision in order to trigger librarian-puppet and wait through an unneeded puppet run, then run vagrant rsync to copy the modules over to the box, and then run vagrant provision again, this time waiting through an unnecessary librarian-puppet update before the "effective" puppet run takes place.

@Temikus Temikus mentioned this issue Mar 23, 2018
@Temikus
Copy link
Collaborator Author

Temikus commented Mar 28, 2018

Fixed in 2.0

@Temikus Temikus closed this as completed Mar 28, 2018
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

No branches or pull requests

1 participant