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

run_provisioner': Catched Error #240

Closed
anton-mishel opened this issue Aug 22, 2015 · 4 comments
Closed

run_provisioner': Catched Error #240

anton-mishel opened this issue Aug 22, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@anton-mishel
Copy link

Getting an error at the provisioner part :

/home/anton/.vagrant.d/gems/gems/vagrant-openstack-provider-0.7.0/lib/vagrant-openstack-provider/action/provision.rb:34:in `run_provisioner': Catched Error: Catched Error: uninitialized constant VagrantPlugins::Shell::Provisioner (NameError)

cat Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'vagrant-openstack-provider'

Vagrant.configure('2') do |config|

  config.vm.box       = 'openstack'
  config.ssh.username = 'ubuntu'
  config.ssh.private_key_path = '~/.ssh/id_rsa' 

  config.vm.provider :openstack do |os|
    os.openstack_auth_url = XXXXX
    os.openstack_compute_url = XXXXX
    os.username           = XXXXXX
    os.password           = XXXXXX
    os.tenant_name        = 'nrgene'
    os.flavor             = 'm1.xlarge'
    os.image              = 'ubuntu 14.04'
    os.user_data          = "#cloud-config\nfqdn: test.nrgene.local\nmanage_etc_hosts: True"
    os.keypair_name       = "dev-vm-anton"
  end
  config.vm.define 'emmer-wheat' do |s|
      s.vm.provider :openstack do |os|
      os.networks             << 'internal'
    end
  end

  config.vm.provision "ansible" do |ansible|
    ansible.playbook = "site.yml"
    ansible.groups = {
      "servers" => ["emmer-wheat"],
      "all_groups:children" => ["servers"],
      }
  end
end
@tomzo
Copy link

tomzo commented Sep 11, 2015

This is definitely bug introduced in 0.7.0. I don't see this error when running on 0.6.1. Here what I get:

==> default: Running provisioner: chef_solo...
An unknown error happened in Vagrant OpenStack provider

To easily debug what happened, we recommend to set the environment
variable VAGRANT_OPENSTACK_LOG to debug

    $ export VAGRANT_OPENSTACK_LOG=debug

If doing this does not help fixing your issue, there may be a bug
in the provider. Please submit an issue on Github at
https://github.com/ggiamarchi/vagrant-openstack-provider
with the stracktrace and the logs.

We are looking for feedback, so feel free to ask questions or
describe features you would like to see in this provider.
/home/tomzo/.vagrant.d/gems/gems/vagrant-openstack-provider-0.7.0/lib/vagrant-openstack-provider/action/provision.rb:34:in `run_provisioner': Catched Error: Catched Error: uninitialized constant VagrantPlugins::Shell::Provisioner (NameError)
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:428:in `hook'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:121:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:121:in `block in call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:103:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:103:in `call'
    from /home/tomzo/.vagrant.d/gems/gems/vagrant-openstack-provider-0.7.0/lib/vagrant-openstack-provider/action/provision.rb:22:in `execute'
    from /home/tomzo/.vagrant.d/gems/gems/vagrant-openstack-provider-0.7.0/lib/vagrant-openstack-provider/action/abstract_action.rb:8:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /home/tomzo/.vagrant.d/gems/gems/vagrant-openstack-provider-0.7.0/lib/vagrant-openstack-provider/action/connect_openstack.rb:32:in `execute'
    from /home/tomzo/.vagrant.d/gems/gems/vagrant-openstack-provider-0.7.0/lib/vagrant-openstack-provider/action/abstract_action.rb:8:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /home/tomzo/.vagrant.d/gems/gems/vagrant-berkshelf-3.0.1/lib/berkshelf/vagrant/action/configure_chef.rb:22:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /home/tomzo/.vagrant.d/gems/gems/vagrant-berkshelf-3.0.1/lib/berkshelf/vagrant/action/load_shelf.rb:27:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/env_set.rb:19:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:214:in `action_raw'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:191:in `block in action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:516:in `lock'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/commands/provision/command.rb:30:in `block in execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:226:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:220:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:220:in `with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/commands/provision/command.rb:29:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:301:in `cli'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/bin/vagrant:174:in `<main>'

@apeyroux
Copy link

Idem

==> default: Rsyncing folder: /home/ja/IdeaProjects/phpbb-dev/ => /vagrant
2015-09-17 13:49 |  INFO | Reading SSH info
==> default: Running provisioner: ansible...
An unknown error happened in Vagrant OpenStack provider

To easily debug what happened, we recommend to set the environment
variable VAGRANT_OPENSTACK_LOG to debug

    $ export VAGRANT_OPENSTACK_LOG=debug

If doing this does not help fixing your issue, there may be a bug
in the provider. Please submit an issue on Github at
https://github.com/ggiamarchi/vagrant-openstack-provider
with the stracktrace and the logs.

We are looking for feedback, so feel free to ask questions or
describe features you would like to see in this provider.
/home/ja/.vagrant.d/gems/gems/vagrant-openstack-provider-0.7.0/lib/vagrant-openstack-provider/action/provision.rb:34:in `run_provisioner': Catched Error: Catched Error: uninitialized constant VagrantPlugins::Shell::Provisioner (NameError)
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:95:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `block in run'
    from /usr/lib/ruby/vendor_ruby/vagrant/util/busy.rb:19:in `busy'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `run'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:352:in `hook'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builtin/provision.rb:115:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builtin/provision.rb:115:in `block in call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builtin/provision.rb:103:in `each'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builtin/provision.rb:103:in `call'
    from /home/ja/.vagrant.d/gems/gems/vagrant-openstack-provider-0.7.0/lib/vagrant-openstack-provider/action/provision.rb:22:in `execute'
    from /home/ja/.vagrant.d/gems/gems/vagrant-openstack-provider-0.7.0/lib/vagrant-openstack-provider/action/abstract_action.rb:8:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `block in run'
    from /usr/lib/ruby/vendor_ruby/vagrant/util/busy.rb:19:in `busy'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `run'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builtin/call.rb:53:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /home/ja/.vagrant.d/gems/gems/vagrant-openstack-provider-0.7.0/lib/vagrant-openstack-provider/action/connect_openstack.rb:32:in `execute'
    from /home/ja/.vagrant.d/gems/gems/vagrant-openstack-provider-0.7.0/lib/vagrant-openstack-provider/action/abstract_action.rb:8:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `block in run'
    from /usr/lib/ruby/vendor_ruby/vagrant/util/busy.rb:19:in `busy'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `run'
    from /usr/lib/ruby/vendor_ruby/vagrant/machine.rb:196:in `action_raw'
    from /usr/lib/ruby/vendor_ruby/vagrant/machine.rb:173:in `block in action'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:440:in `lock'
    from /usr/lib/ruby/vendor_ruby/vagrant/machine.rb:161:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/machine.rb:161:in `action'
    from /usr/share/vagrant/plugins/commands/provision/command.rb:30:in `block in execute'
    from /usr/lib/ruby/vendor_ruby/vagrant/plugin/v2/command.rb:226:in `block in with_target_vms'
    from /usr/lib/ruby/vendor_ruby/vagrant/plugin/v2/command.rb:220:in `each'
    from /usr/lib/ruby/vendor_ruby/vagrant/plugin/v2/command.rb:220:in `with_target_vms'
    from /usr/share/vagrant/plugins/commands/provision/command.rb:29:in `execute'
    from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:42:in `execute'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:258:in `cli'
    from /usr/bin/vagrant:173:in `<main>'

@ggiamarchi ggiamarchi added the bug label Sep 18, 2015
@ggiamarchi ggiamarchi added this to the 0.7.1 milestone Sep 18, 2015
@ggiamarchi ggiamarchi self-assigned this Sep 18, 2015
@ghost
Copy link

ghost commented Sep 30, 2015

FYI:
Vagrant.configure('2') do |config|
...
config.vm.provision "shell", inline: "true"

is a workaround for this issue.

Sharpie added a commit to Sharpie/vagrant-openstack-provider that referenced this issue Nov 1, 2015
Vagrant core tries very hard to be lazy and only loads plugin classes when
necessary. This caused a break in version 0.7.0 when a test was added to
the `provision` action to check if an object is of class
`VagrantPlugins::Shell::Provisioner`. The `vagrant up` action triggers a lazy
load of this class, while the `vagrant provsion` action does not.

This patch ensures the provisioner class is loaded by retrieving it through the
Vagrant plugin manager instead of using a direct reference.

Fixes ggiamarchi#240
@Sharpie
Copy link
Contributor

Sharpie commented Nov 1, 2015

Submitted PR #253 which should fix this.

Sharpie added a commit to Sharpie/vagrant-openstack-provider that referenced this issue Nov 1, 2015
Vagrant core tries very hard to be lazy and only loads plugin classes when
necessary. This caused a break in version 0.7.0 when a test was added to
the `provision` action to check if an object is of class
`VagrantPlugins::Shell::Provisioner`. The `vagrant up` action triggers a lazy
load of this class, while the `vagrant provsion` action does not.

This patch ensures the provisioner class is loaded by retrieving it through the
Vagrant plugin manager instead of using a direct reference.

Fixes ggiamarchi#240
Sharpie added a commit to Sharpie/vagrant-openstack-provider that referenced this issue Nov 1, 2015
Vagrant core tries very hard to be lazy and only loads plugin classes when
necessary. This caused a break in version 0.7.0 when a test was added to
the `provision` action to check if an object is of class
`VagrantPlugins::Shell::Provisioner`. The `vagrant up` action triggers a lazy
load of this class, while the `vagrant provsion` action does not.

This patch ensures the provisioner class is loaded by retrieving it through the
Vagrant plugin manager instead of using a direct reference.

Fixes ggiamarchi#240
Sharpie added a commit to Sharpie/vagrant-openstack-provider that referenced this issue Jan 18, 2016
Vagrant core tries very hard to be lazy and only loads plugin classes when
necessary. This caused a break in version 0.7.0 when a test was added to
the `provision` action to check if an object is of class
`VagrantPlugins::Shell::Provisioner`. The `vagrant up` action triggers a lazy
load of this class, while the `vagrant provsion` action does not.

This patch ensures the provisioner class is loaded by retrieving it through the
Vagrant plugin manager instead of using a direct reference.

Fixes ggiamarchi#240
Sharpie added a commit to Sharpie/vagrant-openstack-provider that referenced this issue Jul 31, 2016
Vagrant core tries very hard to be lazy and only loads plugin classes when
necessary. This caused a break in version 0.7.0 when a test was added to
the `provision` action to check if an object is of class
`VagrantPlugins::Shell::Provisioner`. The `vagrant up` action triggers a lazy
load of this class, while the `vagrant provsion` action does not.

This patch ensures the provisioner class is loaded by retrieving it through the
Vagrant plugin manager instead of using a direct reference.

Fixes ggiamarchi#240
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

5 participants