Closed kvivek1115 closed 5 years ago
This change makes sense - for Chef 15 those requires were moved into deps
for bootstrap.rb
However, I'm not clear how we were able to do away with the require for chef/knife/bootstrap
- that's still needed to reference the class and its load_deps
. Is bootstrap already being required in by knife itself?
Hi @marcparadise ,
However, I'm not clear how we were able to do away with the require for chef/knife/bootstrap - that's still needed to reference the class and its load_deps. Is bootstrap already being required in by knife itself?
No, it's included by knife by default. But somehow it's available at that moment and if we add require it's get loaded multiple times and raises warnings like
/chef/lib/chef/knife/bootstrap.rb:31: warning: already initialized constant Chef::Knife::Bootstrap::SUPPORTED_CONNECTION_PROTOCOLS
/chef/lib/chef/knife/bootstrap.rb:31: warning: previous definition of SUPPORTED_CONNECTION_PROTOCOLS was here
/chef/lib/chef/knife/bootstrap.rb:32: warning: already initialized constant Chef::Knife::Bootstrap::WINRM_AUTH_PROTOCOL_LIST
/chef/lib/chef/knife/bootstrap.rb:32: warning: previous definition of WINRM_AUTH_PROTOCOL_LIST was here
/chef/lib/chef/knife/bootstrap.rb:358: warning: already initialized constant Chef::Knife::Bootstrap::DEPRECATED_FLAGS
/chef/lib/chef/knife/bootstrap.rb:358: warning: previous definition of DEPRECATED_FLAGS was here
to solve this I removed those require classes.
BTW to be safe side going to remove requires files.
Thanks
With which version of the Chef Infra client will/has this fix been released?
Signed-off-by: Vivek Singh vivek.singh@msystechnologies.com
Description
Load dependency required files for knife bootstrap class.
Issues Resolved
https://github.com/chef/knife-windows/issues/479