Closed jimcroft closed 6 years ago
PS. Our Gemfile(s) look like:
source 'https://rubygems.org'
gem 'aws-sdk', '~> 2.2'
gem 'ipaddress', '~> 0.8.2'
gem 'sfn', '3.0.30'
gem 'sparkle_formation', '3.0.28'
group :sfn do
gem 'sfn-parameters', '0.2.4'
end
gem "miasma-aws", "0.3.16" # Pinned to deal with auth regression
group :development do
gem 'rspec', '~> 3.7.0'
end
Debug output of an sfn list
command follows:
> bundle exec sfn list --debug
I, [2018-06-18T11:38:23.416967 #12200] INFO -- : Lock aquired for stack update. Requesting stacks from upstream. (#<Thread:0x000000000291b458>)
ERROR: Miasma::Error::ApiError::RequestError: Forbidden - InvalidClientTokenId: The security token included in the request is invalid
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-0.3.4/lib/miasma/types/api.rb:126:in `block in request'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/bogo-0.2.12/lib/bogo/retry.rb:65:in `run!'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-0.3.4/lib/miasma/types/api.rb:148:in `retryable_request'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-0.3.4/lib/miasma/types/api.rb:123:in `request'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-aws-0.3.16/lib/miasma-aws/api/sts.rb:58:in `assume_role'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-aws-0.3.16/lib/miasma/contrib/aws.rb:606:in `sts_assume_role!'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-aws-0.3.16/lib/miasma/contrib/aws.rb:778:in `make_request'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-0.3.4/lib/miasma/types/api.rb:124:in `block in request'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/bogo-0.2.12/lib/bogo/retry.rb:65:in `run!'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-0.3.4/lib/miasma/types/api.rb:148:in `retryable_request'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-0.3.4/lib/miasma/types/api.rb:123:in `request'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-aws-0.3.16/lib/miasma/contrib/aws/orchestration.rb:80:in `block in load_stack_data'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-aws-0.3.16/lib/miasma/contrib/aws.rb:32:in `all_result_pages'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-aws-0.3.16/lib/miasma/contrib/aws/orchestration.rb:77:in `load_stack_data'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-aws-0.3.16/lib/miasma/contrib/aws/orchestration.rb:539:in `stack_all'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-0.3.4/lib/miasma/models/orchestration/stacks.rb:28:in `perform_population'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-0.3.4/lib/miasma/types/collection.rb:21:in `block in all'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/bogo-0.2.12/lib/bogo/memoization.rb:64:in `memoize'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/miasma-0.3.4/lib/miasma/types/collection.rb:20:in `all'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/provider.rb:178:in `block in fetch_stacks'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/cache.rb:263:in `block in locked_action'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/cache.rb:319:in `lock'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/cache.rb:262:in `locked_action'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/provider.rb:171:in `fetch_stacks'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/provider.rb:101:in `cached_stacks'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/provider.rb:91:in `stacks'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/command/list.rb:36:in `get_stacks'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/bogo-ui-0.1.28/lib/bogo-ui/table.rb:35:in `method_missing'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/command/list.rb:13:in `block (3 levels) in execute!'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/command_module/callbacks.rb:20:in `api_action!'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/bogo-ui-0.1.28/lib/bogo-ui/table.rb:35:in `method_missing'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/command/list.rb:13:in `block (2 levels) in execute!'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/bogo-ui-0.1.28/lib/bogo-ui/table.rb:56:in `table'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/command/list.rb:12:in `block in execute!'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/bogo-ui-0.1.28/lib/bogo-ui/table.rb:78:in `instance_exec'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/bogo-ui-0.1.28/lib/bogo-ui/table.rb:78:in `display'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/lib/sfn/command/list.rb:29:in `execute!'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/bin/sfn:52:in `block (4 levels) in <top (required)>'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/bogo-cli-0.2.14/lib/bogo-cli/setup.rb:26:in `block in bogo_cli_run'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/slop-3.6.0/lib/slop.rb:260:in `parse!'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/slop-3.6.0/lib/slop.rb:235:in `parse!'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/slop-3.6.0/lib/slop.rb:65:in `parse!'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/slop-3.6.0/lib/slop.rb:54:in `parse'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/bogo-cli-0.2.14/lib/bogo-cli/setup.rb:48:in `define'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sfn-3.0.30/bin/sfn:14:in `<top (required)>'
C:/Tools/ruby24/bin/sfn:23:in `load'
C:/Tools/ruby24/bin/sfn:23:in `<main>'
C:\Users\jim\Code\fanduel\fdsfndfs [master ≡]>
I added in a default for the session token pulling from the local environment (here) and I'm betting that's what's causing the problem. I'll get my role stuff set back up and run through it to confirm and should have a fix out soon. Thanks for the report!
Hi
We've noticed a regression when using the newest release 0.3.16 that doesn't appear in previous releases.
This issue seems to resurface the issue reported here https://github.com/sparkleformation/sfn/issues/121, the symptoms are the same.
If we pin miasma-aws to version 0.3.14 or earlier in our Gemfile were fine but due to version constraints we can't use the new sfn release (or kick the tyres on the new plan command).
Happy to provide additional info or troubleshooting.
Thanks
Jim