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

While running "bundle exec rake integration:vagrant" seeing NoMethodError: undefined method 'desc' for Berkshelf::Shelf:Class #22

Open
rodb-bit opened this issue Aug 19, 2021 · 0 comments

Comments

@rodb-bit
Copy link

Cookbook Version

Cookbook version 1.1.0

Chef Client Version

Rakefile gem files:
$ bundle install [21:11:13]
Using rake 13.0.6
Using public_suffix 4.0.6
Using addressable 2.8.0
Using ast 2.4.2
Using aws-eventstream 1.1.1
Using aws-partitions 1.488.0
Using aws-sigv4 1.2.4
Using jmespath 1.4.0
Using aws-sdk-core 3.119.0
Using aws-sdk-ec2 1.255.0
Using aws-sdk-secretsmanager 1.48.0
Using thread_safe 0.3.6
Using descendants_tracker 0.0.4
Using ice_nine 0.11.2
Using axiom-types 0.1.1
Using bcrypt_pbkdf 1.1.0
Using concurrent-ruby 1.1.9
Using chef-utils 17.3.48
Using fuzzyurl 0.9.0
Using tomlrb 1.3.0
Using mixlib-config 3.0.9
Using mixlib-shellout 3.2.5
Using chef-config 17.3.48
Using chef-vault 4.1.0
Using libyajl2 2.1.0
Using ffi-yajl 2.4.0
Using hashie 4.1.0
Using mixlib-log 3.0.9
Using rack 2.2.3
Using uuidtools 2.2.0
Using webrick 1.7.0
Using chef-zero 15.0.7
Using diff-lcs 1.3
Using erubis 2.7.0
Using ffi 1.15.3
Using ffi-libarchive 1.0.17
Using iniparse 1.5.0
Using chef-telemetry 1.1.1
Using faraday-em_http 1.0.0
Using faraday-em_synchrony 1.0.0
Using faraday-excon 1.1.0
Using faraday-net_http 1.0.1
Using faraday-net_http_persistent 1.2.0
Using multipart-post 2.1.1
Using ruby2_keywords 0.0.5
Using faraday 1.4.3
Using faraday_middleware 1.1.0
Using tty-color 0.6.0
Using pastel 0.8.0
Using strings-ansi 0.2.0
Using unicode-display_width 1.7.0
Using unicode_utils 1.4.0
Using strings 0.2.1
Using tty-cursor 0.7.1
Using tty-box 0.7.0
Using tty-screen 0.8.1
Using wisper 2.0.1
Using tty-reader 0.9.0
Using tty-prompt 0.23.1
Using license-acceptance 2.1.13
Using method_source 1.0.0
Using parallel 1.20.1
Using parslet 1.8.2
Using coderay 1.1.3
Using pry 0.14.1
Using rspec-support 3.10.2
Using rspec-core 3.10.1
Using rspec-expectations 3.10.1
Using rspec-mocks 3.10.2
Using rspec 3.10.0
Using rspec-its 1.3.0
Using rubyzip 2.3.2
Using semverse 3.0.0
Using sslshake 1.3.1
Using thor 1.1.0
Using json 2.5.1
Using net-ssh 6.1.0
Using net-scp 3.0.0
Using train-core 3.8.1
Using tty-table 0.12.0
Using inspec-core 4.41.2
Using mixlib-archive 1.1.7
Using mixlib-authentication 3.0.10
Using mixlib-cli 2.1.8
Using net-sftp 3.0.0
Using ipaddress 0.8.3
Using plist 3.6.0
Using wmi-lite 1.0.5
Using ohai 17.3.1
Using proxifier 1.0.3
Using syslog-logger 1.6.8
Using builder 3.2.4
Using erubi 1.10.0
Using gssapi 1.3.1
Using gyoku 1.3.1
Using httpclient 2.8.3
Using little-plugger 1.1.4
Using multi_json 1.15.0
Using logging 2.3.0
Using nori 2.6.0
Using rubyntlm 0.6.3
Using winrm 2.3.6
Using winrm-fs 1.3.5
Using winrm-elevated 1.2.3
Using train-winrm 0.2.12
Using chef 17.3.48
Using cleanroom 1.0.0
Using minitar 0.9
Using sawyer 0.8.2
Using octokit 4.21.0
Using retryable 3.0.5
Using molinillo 0.8.0
Using solve 4.0.4
Using berkshelf 7.2.2
Using bundler 2.2.26
Using cookbook-omnifetch 0.11.1
Using chef-cli 5.4.1
Using fauxhai-ng 9.0.0
Using chefspec 9.3.0
Using coercible 1.0.0
Using parser 3.0.2.0
Using rainbow 3.0.0
Using regexp_parser 2.1.1
Using rexml 3.2.5
Using rubocop-ast 0.8.0
Using ruby-progressbar 1.11.0
Using rubocop 0.88.0
Using cookstyle 6.14.7
Using docile 1.4.0
Using kartograph 0.2.8
Using resource_kit 0.1.7
Using equalizer 0.0.11
Using virtus 1.0.5
Using droplet_kit 3.14.0
Using ed25519 1.2.4
Using racc 1.5.2
Using nokogiri 1.12.3 (x86_64-darwin)
Using rufus-lru 1.1.0
Using polyglot 0.3.5
Using treetop 1.6.11
Using foodcritic 16.3.0
Using formatador 0.3.0
Using rb-fsevent 0.11.0
Using rb-inotify 0.10.1
Using listen 3.6.0
Using lumberjack 1.2.8
Using nenv 0.3.0
Using shellany 0.0.1
Using notiffany 0.1.3
Using guard 2.18.0
Using guard-compat 1.2.1
Using guard-foodcritic 3.0.0
Using guard-kitchen 0.1.0
Using guard-rspec 4.7.3
Using guard-rubocop 1.4.0
Using mixlib-versioning 1.2.12
Using mixlib-install 3.12.16
Using net-ssh-gateway 2.0.0
Using test-kitchen 2.12.0
Using kitchen-digitalocean 0.13.0
Using kitchen-docker 2.11.0
Using kitchen-ec2 3.10.0
Using kitchen-vagrant 1.9.0
Using should_not 1.1.0
Using simplecov-html 0.10.2
Using simplecov 0.16.1
Using vagrant-wrapper 2.0.3
Using yard 0.9.26
Bundle complete! 21 Gemfile dependencies, 168 gems now installed.
Gems in the group 'travis' were not installed.
Use bundle info [gemname] to see where a bundled gem is installed.

Platform Details

Seeing on Ubuntu 20.04, Mac OS X Catalina, Centos 7

Scenario

Trying to run the integration tests on ssh_authorized_keys cookbook

Steps to Reproduce

  • install latest version of VirtualBox
  • install latest version of Vagrant
  • pull ssh_authorized_keys cookbook from GitHub
  • install rbenv to install ruby 2.7.4
  • execute commands in TESTING.md
    when executing 'bundle exec rake integration:vagrant' error will occur, short form:
    rake aborted!
    NoMethodError: undefined method desc' for Berkshelf::Shelf:Class /Users/time/git-repo/ssh_authorized_keys-cookbook/Rakefile:111:in kitchen_instances'
    /Users/time/git-repo/ssh_authorized_keys-cookbook/Rakefile:127:in run_kitchen' /Users/time/git-repo/ssh_authorized_keys-cookbook/Rakefile:132:in block (2 levels) in <top (required)>'
    /Users/time/.rbenv/versions/2.7.4/bin/bundle:23:in load' /Users/time/.rbenv/versions/2.7.4/bin/bundle:23:in '
    Tasks: TOP => integration:vagrant
    (See full trace by running task with --trace)
    FAIL: 1

Expected Result

That Vagrant will create VM's and kitchen will do the test.

Actual Result

$ bundle exec rake integration:vagrant --trace [21:10:24]
** Invoke integration:vagrant (first_time)
** Execute integration:vagrant
rake aborted!
NoMethodError: undefined method desc' for Berkshelf::Shelf:Class /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/berkshelf-7.2.2/lib/berkshelf/commands/shelf.rb:4:in class:Shelf'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/berkshelf-7.2.2/lib/berkshelf/commands/shelf.rb:3:in <module:Berkshelf>' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/berkshelf-7.2.2/lib/berkshelf/commands/shelf.rb:1:in <top (required)>'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/berkshelf-7.2.2/lib/berkshelf/cli.rb:3:in require_relative' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/berkshelf-7.2.2/lib/berkshelf/cli.rb:3:in <top (required)>'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/berkshelf-7.2.2/lib/berkshelf.rb:224:in require_relative' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/berkshelf-7.2.2/lib/berkshelf.rb:224:in <top (required)>'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/provisioner/chef/berkshelf.rb:96:in load_berkshelf!' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/provisioner/chef/berkshelf.rb:50:in load!'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/provisioner/chef_base.rb:487:in load_needed_dependencies!' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/configurable.rb:52:in finalize_config!'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/instance.rb:361:in setup_provisioner' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/instance.rb:107:in initialize'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/config.rb:249:in new' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/config.rb:249:in new_instance'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/config.rb:143:in block in build_instances' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/config.rb:142:in map'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/config.rb:142:in with_index' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/config.rb:142:in build_instances'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/test-kitchen-2.12.0/lib/kitchen/config.rb:116:in instances' /Users/time/git-repo/ssh_authorized_keys-cookbook/Rakefile:111:in kitchen_instances'
/Users/time/git-repo/ssh_authorized_keys-cookbook/Rakefile:127:in run_kitchen' /Users/time/git-repo/ssh_authorized_keys-cookbook/Rakefile:132:in block (2 levels) in <top (required)>'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in block in execute' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in each'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in execute' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:219:in block in invoke_with_call_chain'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in synchronize' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in invoke_with_call_chain'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:188:in invoke' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:160:in invoke_task'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in block (2 levels) in top_level' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in each'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in block in top_level' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:125:in run_with_threads'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:110:in top_level' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:83:in block in run'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in standard_exception_handling' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:80:in run'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rake-13.0.6/exe/rake:27:in <top (required)>' /Users/time/.rbenv/versions/2.7.4/bin/rake:23:in load'
/Users/time/.rbenv/versions/2.7.4/bin/rake:23:in <top (required)>' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:58:in load'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:58:in kernel_load' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:23:in run'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli.rb:477:in exec' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli.rb:31:in dispatch' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli.rb:25:in start' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/exe/bundle:49:in block in <top (required)>'
/Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/friendly_errors.rb:128:in with_friendly_errors' /Users/time/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/exe/bundle:37:in <top (required)>'
/Users/time/.rbenv/versions/2.7.4/bin/bundle:23:in load' /Users/time/.rbenv/versions/2.7.4/bin/bundle:23:in

'
Tasks: TOP => integration:vagrant
FAIL: 1

Note, kitchen runs for a little bit because 0 byte log files are created:
time@E5cap3: ~/git-repo/ssh_authorized_keys-cookbook/.kitchen/logs unified_mode_true
$ ls -l [21:29:02]
total 0
-rw-r--r-- 1 time staff 0 18 Aug 21:28 default-centos-6.log
-rw-r--r-- 1 time staff 0 18 Aug 21:28 kitchen.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant