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

Berkshelf got broken after #229 #248

Closed
artem-sidorenko opened this issue Sep 11, 2015 · 6 comments
Closed

Berkshelf got broken after #229 #248

artem-sidorenko opened this issue Sep 11, 2015 · 6 comments
Assignees
Labels
Milestone

Comments

@artem-sidorenko
Copy link
Contributor

berkshelf from chefdk and vagrant-berkshelf are often used to test the chef cookbooks.

After #229 vagrant-berkshelf and berkshelf don't work anymore:
before #229:

root@af2e082c0f42:/mnt/share/vagrant-openstack-provider/source# git status
HEAD detached at d4d9f43
...
root@af2e082c0f42:/mnt/share/vagrant-openstack-provider/source# bundle exec vagrant up test-server --provider=openstack
.....
Bringing machine 'test-server' up with 'openstack' provider...
    test-server: The Berkshelf shelf is at "/root/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150911-559-psmng7-test-server"
==> test-server: Sharing cookbooks with VM
==> test-server: Updating Vagrant's Berkshelf...
The authenticity of host 'bla'....    <- SSH/Git run via Berkshelf

after #229:

root@af2e082c0f42:/mnt/share/vagrant-openstack-provider/source# git status
HEAD detached at 92d8687
root@af2e082c0f42:/mnt/share/vagrant-openstack-provider/source# bundle exec vagrant up test-server --provider=openstack
...
Bringing machine 'test-server' up with 'openstack' provider...
    test-server: The Berkshelf shelf is at "/root/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150911-1172-1szqf5v-test-server"
==> test-server: Sharing cookbooks with VM
==> test-server: Finding flavor for server...  <- No Berkshelf run
==> test-server: Finding image for server...
==> test-server: Finding network(s) for server...
@artem-sidorenko
Copy link
Contributor Author

I don't know Vagrant code well, but if I take a look here and here my feeling is vagrant-berkshelf is registering the hook to the built-in Provision, which isn't involved anymore by vagrant-openstack-provider.

Right?

@artem-sidorenko
Copy link
Contributor Author

I tested it with following diff, it looks good to me:

diff --git a/source/lib/vagrant-openstack-provider/action.rb b/source/lib/vagrant-openstack-provider/action.rb
index ce55cec..d2fb22d 100644
--- a/source/lib/vagrant-openstack-provider/action.rb
+++ b/source/lib/vagrant-openstack-provider/action.rb
@@ -33,6 +33,7 @@ module VagrantPlugins
             if env[:machine_state_id] == :not_created
               b2.use Message, I18n.t('vagrant_openstack.not_created')
             else
+              b2.use Provision
               b2.use ProvisionWrapper
               b2.use SyncFolders
             end
@@ -99,6 +100,7 @@ module VagrantPlugins
             case env[:machine_state_id]
             when :not_created
               ssh_disabled = env[:machine].provider_config.ssh_disabled
+              b2.use Provision unless ssh_disabled
               b2.use ProvisionWrapper unless ssh_disabled
               b2.use SyncFolders
               b2.use CreateStack

@ggiamarchi
Copy link
Owner

@artem-sidorenko Yes, your diagnostic is right 😥

@artem-sidorenko
Copy link
Contributor Author

@ggiamarchi Do you have probably any news on this? its somehow a dead lock situation:-(

@ggiamarchi
Copy link
Owner

@artem-sidorenko Release 0.7.2 fixes this bug among others.

@artem-sidorenko
Copy link
Contributor Author

@ggiamarchi cool, many thx!

Sharpie pushed a commit to Sharpie/vagrant-openstack-provider that referenced this issue Jul 25, 2016
Sharpie pushed a commit to Sharpie/vagrant-openstack-provider that referenced this issue Jul 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants