Skip to content

Arguments mistmatch error in Initialize #52

Description

@rsankarprgs

Versions:

  • Version of knife-vcenter: 5.0.5
  • Version of chef: 22.7.1006

Platform Details

  • Version of vCenter: VMware Cloud Director 10.2
  • Version of ESXi:

Scenario:

I just downloaded chef workstation and trying to use the vcenter integration and I am seeing below error. How can I get past this? I dont have ruby installed on my machine, so it must be using the ruby bundled with chef-workstation package.

D:\Users\username>knife vcenter host list -VV
INFO: Using configuration from D:/Users/username/.chef/config.rb
C:/opscode/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-cloud-4.0.15/lib/chef/knife/cloud/service.rb:31:in "initialize": wrong number of arguments (given 1, expected 0; required keyword: config) (ArgumentError)`

Stacktrace

    from C:/opscode/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-vcenter-5.0.5/lib/chef/knife/cloud/vcenter_service.rb:45:in "initialize"
    from C:/opscode/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-vcenter-5.0.5/lib/chef/knife/cloud/vcenter_service_helpers.rb:34:in "new"
    from C:/opscode/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-vcenter-5.0.5/lib/chef/knife/cloud/vcenter_service_helpers.rb:34:in "create_service_instance"
    from C:/opscode/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-cloud-4.0.15/lib/chef/knife/cloud/command.rb:42:in "run"
    from C:/opscode/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-17.10.0/lib/chef/knife.rb:494:in "block in run_with_pretty_exceptions"
    from C:/opscode/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0-universal-mingw32/lib/chef/local_mode.rb:42:in "with_server_connectivity"
    from C:/opscode/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-17.10.0/lib/chef/knife.rb:493:in "run_with_pretty_exceptions"
    from C:/opscode/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-17.10.0/lib/chef/knife.rb:233:in "run"
    from C:/opscode/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-17.10.0/lib/chef/application/knife.rb:165:in "run"
    from C:/opscode/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-17.10.0/bin/knife:24:in "<top (required)>"
    from C:/opscode/chef-workstation/bin/knife:407:in "load"        from C:/opscode/chef-workstation/bin/knife:407:in "<main>"

Steps to Reproduce:

Expected Result:

It should show the list of hosts or empty list without any error

Actual Result:

Getting this error
C:/opscode/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-cloud-4.0.15/lib/chef/knife/cloud/service.rb:31:in `initialize': wrong number of arguments (given 1, expected 0; required keyword: config) (ArgumentError)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UntriagedAn issue that has yet to be triaged.Type: BugDoes not work as expected.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions