chef / knife-windows

Plugin for Chef's knife tool for working with Windows nodes
Apache License 2.0
152 stars 110 forks source link

Chef 15: uninitialized constant Chef::Knife::Bootstrap::ClientBuilder #479

Closed btm closed 5 years ago

btm commented 5 years ago

Version:

knife-windows 3.0.0 and chef 15.0.256

Environment:

ubuntu 18.04.02

Scenario:

test knife-windows v3

Steps to Reproduce:

# install the latest Chef omnibus package from current
# from knife-windows source:
rake build
sudo /opt/chef/embedded/bin/gem install pkg/knife-windows-3.0.0.gem
knife bootstrap windows winrm

Expected Result:

displays deprecation message from #478

Actual Result:

$ knife bootstrap windows  winrm
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.256/lib/chef/knife/bootstrap.rb:28: warning: already initialized constant Chef::Knife::Bootstrap::SUPPORTED_CONNECTION_PROTOCOLS
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.256/lib/chef/knife/bootstrap.rb:28: warning: previous definition of SUPPORTED_CONNECTION_PROTOCOLS was here
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.256/lib/chef/knife/bootstrap.rb:29: warning: already initialized constant Chef::Knife::Bootstrap::WINRM_AUTH_PROTOCOL_LIST
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.256/lib/chef/knife/bootstrap.rb:29: warning: previous definition of WINRM_AUTH_PROTOCOL_LIST was here
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.256/lib/chef/knife/bootstrap.rb:339: warning: already initialized constant Chef::Knife::Bootstrap::DEPRECATED_FLAGS
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.256/lib/chef/knife/bootstrap.rb:339: warning: previous definition of DEPRECATED_FLAGS was here
Traceback (most recent call last):
    6: from /opt/chef/bin/knife:148:in `<main>'
    5: from /opt/chef/bin/knife:148:in `load'
    4: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.256/bin/knife:24:in `<top (required)>'
    3: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.256/lib/chef/application/knife.rb:162:in `run'
    2: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.256/lib/chef/knife.rb:219:in `run'
    1: from /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.256/lib/chef/knife.rb:219:in `new'
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.256/lib/chef/knife/bootstrap.rb:397:in `initialize': uninitialized constant Chef::Knife::Bootstrap::ClientBuilder (NameError)
btm commented 5 years ago

Fixed by #480