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

ERROR: knife encountered an unexpected error This may be a bug in the 'vra catalog list' knife command or plugin #64

Open
rejivl opened this issue May 17, 2022 · 0 comments
Labels
Status: Untriaged An issue that has yet to be triaged.

Comments

@rejivl
Copy link

rejivl commented May 17, 2022

Versions

  • Version of knife-vrealize:6.0.2
  • Version of chef:
    Chef Workstation version: 22.5.923
    Test Kitchen version: 3.2.2
    Cookstyle version: 7.32.1
    Chef Infra Client version: 17.10.0
    Chef InSpec version: 4.56.20
    Chef CLI version: 5.6.1
    Chef Habitat version: 1.6.420

Platform Details

  • Version of vRA: 8.8
  • Version of vRO:
  • Version of ESXi: 7.7

Scenario

When trying to execute $knife vra catalog list , getting error.
Does this plugin support vRA version 8.8

Steps to Reproduce

Installed Chef workstation.
Installed the knife-vrealize plugin.
Update the config.rb with the VRA details.

Expected Result

List of catalog items.

Actual Result

[root@k8sworker02 .chef]# knife vra catalog list

FATAL: Unknown resource error : undefined method `status' for #<Vra::CatalogItem:0x0000000003ef7420 @client=#<Vra::Client:0x0000000003e7ba78 @base_url="https://vrasrv88.gosds.com", @username="administrator@vsphere.local", @password=, @Tenant="vsphere.local", @verify_ssl=false, @refresh_token=, @access_token=********, @page_size=200, @catalog=#<Vra::Catalog:0x0000000003e7aec0 @client=#<Vra::Client:0x0000000003e7ba78 ...>>>, @id="b0b8c7fd-d21d-367f-8cb6-a1be819d3432", @DaTa={"id"=>"b0b8c7fd-d21d-367f-8cb6-a1be819d3432", "name"=>"Backup Service", "sourceId"=>"5fa82c08-6691-4f06-87da-1ae0096602ae", "sourceName"=>"Backup Service", "type"=>{"id"=>"com.vmw.vro.workflow", "link"=>"/catalog/api/types/com.vmw.vro.workflow", "name"=>"vRealize Orchestrator Workflow"}, "createdAt"=>"2022-05-05T08:16:17.186574Z", "createdBy"=>"administrator@vsphere.local", "lastUpdatedAt"=>"2022-05-17T02:50:01.384277Z", "lastUpdatedBy"=>"system-user", "bulkRequestLimit"=>1}, @project_id=nil>

ERROR: knife encountered an unexpected error

This may be a bug in the 'vra catalog list' knife command or plugin

Please collect the output of this command with the -VVV option before filing a bug report.

Exception: NoMethodError: undefined method `status' for #<Vra::CatalogItem:0x0000000003ef7420 @client=#<Vra::Client:0x0000000003e7ba78 @base_url="https://vrasrv88.gosds.com", @username="administrator@vsphere.local", @password=, @Tenant="vsphere.local", @verify_ssl=false, @refresh_token=, @access_token=********, @page_size=200, @catalog=#<Vra::Catalog:0x0000000003e7aec0 @client=#<Vra::Client:0x0000000003e7ba78 ...>>>, @id="b0b8c7fd-d21d-367f-8cb6-a1be819d3432", @DaTa={"id"=>"b0b8c7fd-d21d-367f-8cb6-a1be819d3432", "name"=>"Backup Service", "sourceId"=>"5fa82c08-6691-4f06-87da-1ae0096602ae", "sourceName"=>"Backup Service", "type"=>{"id"=>"com.vmw.vro.workflow", "link"=>"/catalog/api/types/com.vmw.vro.workflow", "name"=>"vRealize Orchestrator Workflow"}, "createdAt"=>"2022-05-05T08:16:17.186574Z", "createdBy"=>"administrator@vsphere.local", "lastUpdatedAt"=>"2022-05-17T02:50:01.384277Z", "lastUpdatedBy"=>"system-user", "bulkRequestLimit"=>1}, @project_id=nil>

###====================== Output of the command collected with -VVV =========================================

[root@k8sworker02 .chef]# knife vra catalog list -VVV

INFO: Using configuration from /root/.chef/config.rb

FATAL: Unknown resource error : undefined method `status' for #<Vra::CatalogItem:0x0000000003da5fb8 @client=#<Vra::Client:0x0000000003d326a8 @base_url="https://vrasrv88.gosds.com", @username="administrator@vsphere.local", @password=, @Tenant="vsphere.local", @verify_ssl=false, @refresh_token=, @access_token=********, @page_size=200, @catalog=#<Vra::Catalog:0x0000000003d31a78 @client=#<Vra::Client:0x0000000003d326a8 ...>>>, @id="b0b8c7fd-d21d-367f-8cb6-a1be819d3432", @DaTa={"id"=>"b0b8c7fd-d21d-367f-8cb6-a1be819d3432", "name"=>"Backup Service", "sourceId"=>"5fa82c08-6691-4f06-87da-1ae0096602ae", "sourceName"=>"Backup Service", "type"=>{"id"=>"com.vmw.vro.workflow", "link"=>"/catalog/api/types/com.vmw.vro.workflow", "name"=>"vRealize Orchestrator Workflow"}, "createdAt"=>"2022-05-05T08:16:17.186574Z", "createdBy"=>"administrator@vsphere.local", "lastUpdatedAt"=>"2022-05-17T02:50:01.384277Z", "lastUpdatedBy"=>"system-user", "bulkRequestLimit"=>1}, @project_id=nil>

/opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-cloud-4.0.15/lib/chef/knife/cloud/list_resource_command.rb:63:in block in get_resource_col_val': undefined method status' for #<Vra::CatalogItem:0x0000000003da5fb8 @client=#<Vra::Client:0x0000000003d326a8 @base_url="https://vrasrv88.gosds.com", @username="administrator@vsphere.local", @password=, @Tenant="vsphere.local", @verify_ssl=false, @refresh_token=, @access_token=********, @page_size=200, @catalog=#<Vra::Catalog:0x0000000003d31a78 @client=#<Vra::Client:0x0000000003d326a8 ...>>>, @id="b0b8c7fd-d21d-367f-8cb6-a1be819d3432", @DaTa={"id"=>"b0b8c7fd-d21d-367f-8cb6-a1be819d3432", "name"=>"Backup Service", "sourceId"=>"5fa82c08-6691-4f06-87da-1ae0096602ae", "sourceName"=>"Backup Service", "type"=>{"id"=>"com.vmw.vro.workflow", "link"=>"/catalog/api/types/com.vmw.vro.workflow", "name"=>"vRealize Orchestrator Workflow"}, "createdAt"=>"2022-05-05T08:16:17.186574Z", "createdBy"=>"administrator@vsphere.local", "lastUpdatedAt"=>"2022-05-17T02:50:01.384277Z", "lastUpdatedBy"=>"system-user", "bulkRequestLimit"=>1}, @project_id=nil> (NoMethodError)

from /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-cloud-4.0.15/lib/chef/knife/cloud/list_resource_command.rb:62:in `each'

from /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-cloud-4.0.15/lib/chef/knife/cloud/list_resource_command.rb:62:in `get_resource_col_val'

from /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-cloud-4.0.15/lib/chef/knife/cloud/list_resource_command.rb:83:in `block in list'

from /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-cloud-4.0.15/lib/chef/knife/cloud/list_resource_command.rb:79:in `each'

from /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-cloud-4.0.15/lib/chef/knife/cloud/list_resource_command.rb:79:in `list'

from /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-cloud-4.0.15/lib/chef/knife/cloud/list_resource_command.rb:38:in `execute_command'

from /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-cloud-4.0.15/lib/chef/knife/cloud/command.rb:50:in `run'

from /opt/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 /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.0/lib/chef/local_mode.rb:42:in `with_server_connectivity'

from /opt/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 /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-17.10.0/lib/chef/knife.rb:233:in `run'

from /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-17.10.0/lib/chef/application/knife.rb:165:in `run'

from /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/knife-17.10.0/bin/knife:24:in `<top (required)>'

from /usr/bin/knife:383:in `load'

from /usr/bin/knife:383:in `<main>'

[root@k8sworker02 .chef]#

@rejivl rejivl added the Status: Untriaged An issue that has yet to be triaged. label May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant