miasma-rb / miasma-aws

Miasma AWS API
Other
8 stars 8 forks source link

FATAL: Unexpected Error: odd number of arguments for Hash during Cloudformation inspect #9

Closed petecheslock closed 9 years ago

petecheslock commented 9 years ago

When trying to inspect a cloudformation stack on AWS getting this error when trying to list --nodes in knife cloudformation & sfn - also when trying to expand the resource.

DEBUG=true sfn inspect stack-name --nodes
Stack inspection stack-name:
FATAL: Unexpected Error: odd number of arguments for Hash
FATAL: Exception information: ArgumentError: odd number of arguments for Hash
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/hashie-2.1.2/lib/hashie/extensions/indifferent_access.rb:42:in `[]'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/hashie-2.1.2/lib/hashie/extensions/indifferent_access.rb:42:in `[]'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/miasma-aws-0.1.16/lib/miasma/contrib/aws.rb:431:in `block (2 levels) in load_aws_file'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/miasma-aws-0.1.16/lib/miasma/contrib/aws.rb:425:in `each'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/miasma-aws-0.1.16/lib/miasma/contrib/aws.rb:425:in `block in load_aws_file'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/miasma-aws-0.1.16/lib/miasma/contrib/aws.rb:423:in `tap'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/miasma-aws-0.1.16/lib/miasma/contrib/aws.rb:423:in `load_aws_file'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/miasma-aws-0.1.16/lib/miasma/contrib/aws.rb:376:in `custom_setup'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/miasma-0.2.26/lib/miasma/types/api.rb:24:in `initialize'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/miasma-0.2.26/lib/miasma.rb:43:in `new'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/miasma-0.2.26/lib/miasma.rb:43:in `api'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/miasma-aws-0.1.16/lib/miasma/contrib/aws.rb:359:in `block in api_for'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/bogo-0.1.26/lib/bogo/memoization.rb:60:in `memoize'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/miasma-aws-0.1.16/lib/miasma/contrib/aws.rb:356:in `api_for'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/miasma-0.2.26/lib/miasma/models/orchestration/resource.rb:48:in `expand'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/knife-cloudformation-0.2.24/lib/chef/knife/cloudformation_inspect.rb:169:in `block in display_nodes'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/knife-cloudformation-0.2.24/lib/chef/knife/cloudformation_inspect.rb:168:in `map'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/knife-cloudformation-0.2.24/lib/chef/knife/cloudformation_inspect.rb:168:in `display_nodes'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/knife-cloudformation-0.2.24/lib/chef/knife/cloudformation_inspect.rb:60:in `block in _run'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/knife-cloudformation-0.2.24/lib/chef/knife/cloudformation_inspect.rb:58:in `map'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/knife-cloudformation-0.2.24/lib/chef/knife/cloudformation_inspect.rb:58:in `_run'
/Users/petecheslock/.chefdk/gem/ruby/2.1.0/gems/knife-cloudformation-0.2.24/lib/knife-cloudformation/knife/base.rb:109:in `run'
/opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:422:in `block in run_with_pretty_exceptions'
/opt/chefdk/embedded/apps/chef/lib/chef/local_mode.rb:39:in `with_server_connectivity'
/opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:421:in `run_with_pretty_exceptions'
/opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:214:in `run'
/opt/chefdk/embedded/apps/chef/lib/chef/application/knife.rb:142:in `run'
/opt/chefdk/embedded/apps/chef/bin/knife:25:in `<top (required)>'
/opt/chefdk/bin/knife:51:in `load'
/opt/chefdk/bin/knife:51:in `<main>'

sfn inspect stack-name -a 'resources.all.at(1)' will work but trying to expand on that fails with the same error.

Strangely enough this works fine on another account with a stack built with the same template.

chrisroberts commented 9 years ago

Few updates to apply:

chrisroberts commented 9 years ago

Fixed! - v0.1.18