tknerr / vagrant-managed-servers

Enables Vagrant to ssh into and provision managed servers
MIT License
185 stars 30 forks source link

Error on "vagrant up": undefined method 'communicator' #40

Closed LiamK closed 9 years ago

LiamK commented 9 years ago

Hi --

Just started using this and ran into a problem. The "up" command successfully adds the box "tknerr/managed-server-dummy". The it throws an error, as you can see below. What am I doing wrong? I'm doing it almost exactly as in the example.

Liam

config.vm.define :rideshare_production do |rs|
    rs.vm.box = "tknerr/managed-server-dummy"
    rs.omnibus.chef_version = '11.16.4'
    rs.vm.provider :managed do |managed, override|
      managed.server = "name.mydomain.com"
      override.ssh.username = "admin"
      override.ssh.private_key_path = "/home/liam/.ssh/aws-mykey.pem"
    end
    ...
(end)
vagrant up --provider=managed rideshare_production
Bringing machine 'rideshare_production' up with 'managed' provider...
==> rideshare_production: Box 'tknerr/managed-server-dummy' could not be found. Attempting to find and install...
    rideshare_production: Box Provider: managed
    rideshare_production: Box Version: >= 0
==> rideshare_production: Loading metadata for box 'tknerr/managed-server-dummy'
    rideshare_production: URL: https://vagrantcloud.com/tknerr/managed-server-dummy
==> rideshare_production: Adding box 'tknerr/managed-server-dummy' (v1.0.0) for provider: managed
    rideshare_production: Downloading: https://atlas.hashicorp.com/tknerr/boxes/managed-server-dummy/versions/1.0.0/providers/managed.box
==> rideshare_production: Successfully added box 'tknerr/managed-server-dummy' (v1.0.0) for 'managed'!
/opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/plugin/v2/config.rb:73:in `method_missing': undefined method `communicator' for #<VagrantPlugins::Kernel_V2::VMConfig:0x007fc9c435f738> (NoMethodError)
    from /home/liam/.vagrant.d/gems/gems/vagrant-managed-servers-0.6.0/lib/vagrant-managed-servers/action/warn_networks.rb:18:in `custom_networking_defined?'
    from /home/liam/.vagrant.d/gems/gems/vagrant-managed-servers-0.6.0/lib/vagrant-managed-servers/action/warn_networks.rb:10:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/machine.rb:157:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/batch_action.rb:72:in `block (2 levels) in run'
tknerr commented 9 years ago

Hi @LiamK, I'm afraid the README states it is a Vagrant 1.2+ plugin but I don't have any regression tests against older Vagrant versions set up :-/

Your vagrant 1.5.1 is quite a bit old. I suspect once you update to a newer (1.6+) version that problem should be gone.

I'd even recommend using the latest 1.7.2 version. Runs quite stable for me.

tknerr commented 9 years ago

I digged a bit deeper and indeed the communicator config which we need for winrm support exists only with vagrant >= 1.6

Here is it: https://github.com/mitchellh/vagrant/blob/v1.6.0/plugins/kernel_v2/config/vm.rb#L28

But here not: https://github.com/mitchellh/vagrant/blob/v1.5.1/plugins/kernel_v2/config/vm.rb

tknerr commented 9 years ago

@LiamK just updated the vagrant version requirement validation to check for 1.6+. With the next release of the plugin you should get better error reporting in such a case.

Please let me know if upgrading to vagrant 1.6+ fixed your issue.

LiamK commented 9 years ago

Thanks for getting back to me so quickly! I saw the 1.2+ and thought I would be okay at 1.5.1. I'll upgrade to the latest and let you know how it goes.

On 04/01/2015 03:47 PM, Torben Knerr wrote:

@LiamK https://github.com/LiamK just updated the vagrant version requirement validation to check for 1.6+. With the next release of the plugin you should get better error reporting in such a case.

Please let me know if upgrading to vagrant 1.6+ fixed your issue.

— Reply to this email directly or view it on GitHub https://github.com/tknerr/vagrant-managed-servers/issues/40#issuecomment-88655570.

Liam Kirsher PGP: http://liam.numenet.com/pgp/

LiamK commented 9 years ago

I upgraded to 1.7.2 and it is working. Thanks!

tknerr commented 9 years ago

@LiamK perfect, thanks for letting me know!