cloudfoundry / bosh-aws-cpi-release

BOSH AWS CPI
Apache License 2.0
29 stars 62 forks source link

The operator should receive a human-readable error if region is invalid #29

Closed ljfranklin closed 8 years ago

ljfranklin commented 8 years ago

A user on the bosh slack specified "us-east" instead of "us-east-1" as the region in their manifest. Instead of a human-readable error (e.g. "Invalid region 'us-east'"), they received this:

Starting registry... Finished (00:00:00)
Uploading stemcell 'bosh-aws-xen-hvm-ubuntu-trusty-go_agent/3012'... Failed (00:00:05)
Stopping registry... Finished (00:00:00)
Cleaning up rendered CPI jobs... Finished (00:00:00)

Command 'deploy' failed:
  creating stemcell (bosh-aws-xen-hvm-ubuntu-trusty-go_agent 3012):
    CPI 'create_stemcell' method responded with error: CmdError{"type":"Unknown","message":"getaddrinfo: nodename nor servname provided, or not known","ok_to_retry":false}
ljfranklin commented 8 years ago

Steps to reproduce at the unit level:

provider = AWS::Core::CredentialProviders::StaticProvider.new(:access_key_id => 'ACCESS_KEY', :secret_access_key => "SECRET_KEY")
client = AWS::EC2.new(:credential_provider => provider, :region => 'bogus')
client.regions.first

Output:

SocketError: getaddrinfo: nodename nor servname provided, or not known
ljfranklin commented 8 years ago

+1 from the bosh mailing list. Search for "[cf-bosh] bosh-init on AWS failed"

dpb587-pivotal commented 8 years ago

I think this was improved in v52 and can be closed.