intuit / simple_deploy

Maintenance Mode - Simple Deploy is an opinionated CLI tool for managing AWS Cloud Formation Stacks.
MIT License
64 stars 22 forks source link

Certain commands cause excon to throw Invalid Excon request keys: :host #210

Closed Gusymochis closed 11 years ago

Gusymochis commented 11 years ago

simple_deploy status -n -e default throws the following exception:

Invalid Excon request keys: :host
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.27.2/lib/excon/connection.rb:231:in `request'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/fog-1.10.0/lib/fog/core/connection.rb:21:in `request'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/fog-1.10.0/lib/fog/aws/simpledb.rb:181:in `request'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/fog-1.10.0/lib/fog/aws/requests/simpledb/list_domains.rb:24:in `list_domains'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/aws/simpledb.rb:15:in `domains'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/aws/simpledb.rb:19:in `domain_exists?'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/aws/simpledb.rb:23:in `create_domain'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/entry.rb:63:in `create_domain'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/entry.rb:12:in `initialize'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/stack.rb:24:in `new'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/stack.rb:24:in `initialize'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/cli/status.rb:29:in `new'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/cli/status.rb:29:in `show'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/cli.rb:59:in `start'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/bin/simple_deploy:6:in `<top (required)>'
/Users/user/.rvm/gems/ruby-2.0.0-p0/bin//simple_deploy:23:in `load'
/Users/user/.rvm/gems/ruby-2.0.0-p0/bin//simple_deploy:23:in `<main>'
/Users/user/.rvm/gems/ruby-2.0.0-p0/bin//ruby_noexec_wrapper:14:in `eval'
/Users/user/.rvm/gems/ruby-2.0.0-p0/bin//ruby_noexec_wrapper:14:in `<main>'
Invalid Excon request keys: :host
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.27.2/lib/excon/connection.rb:231:in `request'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/fog-1.10.0/lib/fog/core/connection.rb:21:in `request'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/fog-1.10.0/lib/fog/aws/cloud_formation.rb:99:in `request'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/fog-1.10.0/lib/fog/aws/requests/cloud_formation/describe_stacks.rb:33:in `describe_stacks'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/aws/cloud_formation.rb:43:in `describe_stack'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/aws/cloud_formation.rb:61:in `stack_status'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/stack/stack_reader.rb:18:in `status'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/stack.rb:134:in `status'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/cli/status.rb:33:in `block in show'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/cli/shared.rb:43:in `rescue_exceptions_and_exit'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/cli/status.rb:32:in `show'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/lib/simple_deploy/cli.rb:59:in `start'
/Users/user/.rvm/gems/ruby-2.0.0-p247/gems/simple_deploy-0.7.5/bin/simple_deploy:6:in `<top (required)>'
/Users/user/.rvm/gems/ruby-2.0.0-p0/bin//simple_deploy:23:in `load'
/Users/user/.rvm/gems/ruby-2.0.0-p0/bin//simple_deploy:23:in `<main>'
/Users/user/.rvm/gems/ruby-2.0.0-p0/bin//ruby_noexec_wrapper:14:in `eval'
/Users/user/.rvm/gems/ruby-2.0.0-p0/bin//ruby_noexec_wrapper:14:in `<main>'
CREATE_COMPLETE
weavenet commented 11 years ago

I'm unable to reproduce it:

bweaver@SDGL104689e7a in ~/code/simple_deploy ( 09:46:18 || master )
# simple_deploy status -n -e default
Error: option '-n' needs a parameter.
Try --help for help.

What version of SD are you using? Can you post a sanitized (all keys & passwords removed) version of your configuration file?

Gusymochis commented 11 years ago

Simple_deploy => 0.7.5 Fog => 1.10.0 Excon => 0.27.2

Running on OS X (Darwin Kernel Version 12.5.0: Mon Jul 29 16:33:49 PDT 2013; root:xnu-2050.48.11~1/RELEASE_X86_64)

Config (simple_deploy.yml): ----------------starts here------------------------------- environments: default: secret_key: access_key: region: us-west-1


weavenet commented 11 years ago

can you confirm your config file is properly formated yaml? For example

---
environments:
  env1:
    access_key: 01234567890123456789
    secret_key: 0123456789012345678901234567890123456789
    region: us-west-1

  env2:
    access_key: 01234567890123456789
    secret_key: 0123456789012345678901234567890123456789
    region: us-west-1
Gusymochis commented 11 years ago

Sorry about the formatting this is how it looks including the spaces.

environments:
    default:
        secret_key: aAaAaAbBbBbBbBcCcCcCcCdDdDdDdDeEeEeEeE 
        access_key: 012345678901234567890
        region: us-west-1

I know the configuration is OK because simple deploy runs the tasks, the only problems is that every function call includes the stack trace where the :host is not found (is not a functional problem, but mostly annoying and hard to see logs).

weavenet commented 11 years ago

@Gusymochis got it. We have recently updated SD with a new version of Fog which we are getting ready to release. Not %100 sure if this is related, but it's a good place to start.

@ccloes-intuit are we good to release 0.7.6 out of beta?

Gusymochis commented 11 years ago

Thanks, I will be waiting impatiently for this new version, I will test and update if any problems arise.

ccloes-intuit commented 11 years ago

@Gusymochis we updated to fog 1.15 and released another beta version 0.7.6.beta.5. Please give that one a try.

It also appears that fog released an update to 1.16 today which appears to have some bugs related to excon which we are pursuing with their maintainers.

ccloes-intuit commented 11 years ago

@Gusymochis in looking at your error now after my investigation into fog today, I believe it is related to you having the later version of excon. If it is an option to downrev your excon version, then that will likely resolve this issue for you.

Gusymochis commented 11 years ago

I will try this, a quick way to evade this is sending the STDERR into null, by appending 2&>/dev/null at the end of the command.

Gusymochis commented 11 years ago

@ccloes-intuit which version of excon is the one required for simple deploy?

ccloes-intuit commented 11 years ago

Use excon 0.20. The 1.10 version of fog required excon 0.20.

Gusymochis commented 11 years ago

It worked flawlessly.

ccloes-intuit commented 11 years ago

@Gusymochis we just released 0.7.6 which binds to a specific excon. This should resolve these types of errors going forward.