euca2ools doesn't parse EC2_URL correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
euca2ools |
Fix Released
|
Undecided
|
Mitch Garnaat | ||
euca2ools (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: euca2ools
The EC2_URL shell variable holds an URL to an EC2 or Eucalyptus endpoint.
There is a problem with the URL parsing code where, if said URL doesn't contain a port number, it thinks the whole URL is a hostname.
Example (with fake keys on purpose):
export EC2_URL="https:/
export EC2_SECRET_KEY=1
export EC2_ACCESS_KEY=1
$ euca-describe-
(wait a long time).
[Errno -2] Name or service not known
Now change the EC2_URL so that is also includes the port number:
export EC2_URL="https:/
And the expected answer comes right away:
$ euca-describe-
AuthFailure: No user with access key '1'
A packet sniffer shows that without the port number in the URL, euca2ools is trying to resolve the wrong hostname:
0.000000 10.0.1.7 -> 10.0.1.1 DNS Standard query AAAA staging.
0.009434 10.0.1.1 -> 10.0.1.7 DNS Standard query response, No such name
0.028092 10.0.1.7 -> 10.0.1.1 DNS Standard query A staging.
0.048702 10.0.1.1 -> 10.0.1.7 DNS Standard query response, No such name
I tried with both euca2ools 1.2-0ubuntu10.1 from lucid and 1.3.1-0ubuntu5 from natty.
Changed in euca2ools (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in euca2ools: | |
assignee: | nobody → Mitch Garnaat (mitch-garnaat) |
status: | New → Fix Committed |
Changed in euca2ools: | |
status: | Fix Committed → Fix Released |
I believe this is fixed in the latest code which uses urlparse to split the URL rather than doing things manually.