test-kitchen / kitchen-vagrant

A Test Kitchen Driver for Vagrant
Other
348 stars 189 forks source link

`network': wrong number of arguments (given 2, expected 1) (ArgumentError) #478

Closed nusenu closed 1 year ago

nusenu commented 1 year ago

:ghost: Brief Description

I used to have this suite and it worked for a long time, but now it fails:

  - name: t-guard-2publicIPs
    driver:
      network:
      - ["private_network", {ip: "192.0.2.10"}]
      - ["private_network", {ip: "198.51.100.10"}]

https://github.com/nusenu/ansible-relayor/blob/da26b86de6553435b3e81b08d8206809f4e8a219/.kitchen.yml#L77

Version

Environment

Scenario

trying to run a suite that assigns multiple IPs

Steps to Reproduce

  1. git clone https://github.com/nusenu/ansible-relayor.git
  2. cd ansible-relayor
  3. kitchen test t-guard-2publicIPs-debian-11
  4. See error in actual result section

Expected Result

In the past it worked (multiple IP addresses got configured in the VM).

Actual Result

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider virtualbox ----
STDOUT: 
STDERR: /usr/share/vagrant/gems/gems/vagrant-2.2.19/plugins/kernel_v2/config/vm.rb:320:in `network': wrong number of arguments (given 2, expected 1) (ArgumentError)
        from .../ansible-relayor/.kitchen/kitchen-vagrant/t-guard-2publicIPs-debian-11/Vagrantfile:5:in `block in <top (required)>'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/config/v2/loader.rb:37:in `load'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:126:in `block (2 levels) in load'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:119:in `each'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:119:in `block in load'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:116:in `each'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:116:in `load'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/vagrantfile.rb:29:in `initialize'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/environment.rb:793:in `new'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/environment.rb:793:in `vagrantfile'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/environment.rb:974:in `process_configured_plugins'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/environment.rb:178:in `initialize'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/bin/vagrant:194:in `new'
        from /usr/share/vagrant/gems/gems/vagrant-2.2.19/bin/vagrant:194:in `<top (required)>'
        from /usr/share/vagrant/gems/bin/vagrant:25:in `load'
        from /usr/share/vagrant/gems/bin/vagrant:25:in `<main>'
---- End output of vagrant up --no-provision --provider virtualbox ----
Ran vagrant up --no-provision --provider virtualbox returned 1] on t-guard-2publicIPs-debian-11

:heavy_plus_sign: Additional context

I'm not sure in which part of the stack (kitchen, kitchen-vagrant, vagrant, VirtualBox) the issue resides.

vkarve-chef commented 1 year ago

duplicate of https://github.com/test-kitchen/kitchen-vagrant/issues/476