You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EC2 Driver Relies on undefined refresh! method of Aws::Credentials in at least some cases
Some credentials classes are non-refreshing and when those are in use
test-kitchen may trigger an inappropriate call.
Version
$ chef -v
Chef Workstation version: 21.4.365
Chef Infra Client version: 16.12.3
Chef InSpec version: 4.29.3
Chef CLI version: 4.0.0
Chef Habitat version: 1.6.288
Test Kitchen version: 2.11.2
Cookstyle version: 7.10.0
I tested this down to the latest 20 release as well.
Environment
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Doesn't seem to have anything to do with the contents of the kitchen run.
Scenario
Use EC2 test platforms and have a decent error message if the clock is skewed.
Steps to Reproduce
I'm happy to go to the trouble of providing a little Vagrantfile/.kitchen.yml reproduction repo if there's interest in fixing this. Didn't want to go that far until someone told me I should. :)
Anything but a call to an undefined method by the AWS SDK.
Actual Result
E, [2021-04-29T12:17:23.206405 #25650] ERROR -- Kitchen: ------Exception-------
E, [2021-04-29T12:17:23.206671 #25650] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2021-04-29T12:17:23.206909 #25650] ERROR -- Kitchen: Message: 1 actions failed.
>>>>>> Failed to complete #create action: [undefined method `refresh!' for #<Aws::SharedCredentials:0x0000000002ba4a58>] on test-ec2-2004
E, [2021-04-29T12:17:23.207086 #25650] ERROR -- Kitchen: ----------------------
E, [2021-04-29T12:17:23.207162 #25650] ERROR -- Kitchen: ------Backtrace-------
E, [2021-04-29T12:17:23.207218 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/test-kitchen-2.11.2/lib/kitchen/command.rb:181:in `report_errors'
E, [2021-04-29T12:17:23.207274 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/test-kitchen-2.11.2/lib/kitchen/command.rb:172:in `run_action'
E, [2021-04-29T12:17:23.207332 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/test-kitchen-2.11.2/lib/kitchen/command/action.rb:35:in `block in call'
E, [2021-04-29T12:17:23.207385 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/2.7.0/benchmark.rb:293:in `measure'
E, [2021-04-29T12:17:23.207442 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/test-kitchen-2.11.2/lib/kitchen/command/action.rb:33:in `call'
E, [2021-04-29T12:17:23.207617 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/test-kitchen-2.11.2/lib/kitchen/cli.rb:52:in `perform'
E, [2021-04-29T12:17:23.207664 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/test-kitchen-2.11.2/lib/kitchen/cli.rb:198:in `block (2 levels) in <class:CLI>'
E, [2021-04-29T12:17:23.207700 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
E, [2021-04-29T12:17:23.207798 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
E, [2021-04-29T12:17:23.208033 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
E, [2021-04-29T12:17:23.209106 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
E, [2021-04-29T12:17:23.209277 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/test-kitchen-2.11.2/bin/kitchen:11:in `block in <top (required)>'
E, [2021-04-29T12:17:23.209557 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/test-kitchen-2.11.2/lib/kitchen/errors.rb:170:in `with_friendly_errors'
E, [2021-04-29T12:17:23.209841 #25650] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/test-kitchen-2.11.2/bin/kitchen:11:in `<top (required)>'
E, [2021-04-29T12:17:23.210094 #25650] ERROR -- Kitchen: /usr/bin/kitchen:354:in `load'
E, [2021-04-29T12:17:23.210174 #25650] ERROR -- Kitchen: /usr/bin/kitchen:354:in `<main>'
E, [2021-04-29T12:17:23.210233 #25650] ERROR -- Kitchen: ----End Backtrace-----
Additional context
I'm willing to bet dollars to pay that this is actually an upstream issue
in https://github.com/aws/aws-sdk-ruby but I'm not sure whether it would
make more sense to defend against it here while simultaneously opening a
bug report there.
The text was updated successfully, but these errors were encountered:
EC2 Driver Relies on undefined
refresh!
method ofAws::Credentials
in at least some casesSome credentials classes are non-refreshing and when those are in use
test-kitchen may trigger an inappropriate call.
Version
I tested this down to the latest
20
release as well.Environment
Doesn't seem to have anything to do with the contents of the kitchen run.
Scenario
Use EC2 test platforms and have a decent error message if the clock is skewed.
Steps to Reproduce
I'm happy to go to the trouble of providing a little
Vagrantfile/.kitchen.yml
reproduction repo if there's interest in fixing this. Didn't want to go that far until someone told me I should. :)Launch an Ubuntu 20.04 instance
Install chef-workstation like:
Setup a
.kitchen.yml
file with an EC2 platform. Something like:Login to the Ubuntu instance, skew the clock, and go for a
create
.Something like:
Unskew the clock and retry the
create
action:Expected Result
Anything but a call to an undefined method by the AWS SDK.
Actual Result
Additional context
I'm willing to bet dollars to pay that this is actually an upstream issue
in https://github.com/aws/aws-sdk-ruby but I'm not sure whether it would
make more sense to defend against it here while simultaneously opening a
bug report there.
The text was updated successfully, but these errors were encountered: