cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Reategui (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-7405) ec2 metadata service requires trailing / for listing items
Date Mon, 25 Aug 2014 16:27:59 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-7405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14109271#comment-14109271
] 

Carlos Reategui commented on CLOUDSTACK-7405:
---------------------------------------------

I sent this to the dev list but thought I should include here too:

Here are examples comparing released 4.3 vs AWS EC2 (I am also including the headers and in
the case of user-data only the headers):

ACS 4.3

$ curl -I http://172.30.45.101/latest/user-data/
HTTP/1.1 404 Not Found
Date: Mon, 25 Aug 2014 15:53:18 GMT
Server: Apache
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1

$ curl -I http://172.30.45.101/latest/user-data
HTTP/1.1 200 OK
Date: Mon, 25 Aug 2014 15:53:23 GMT
Server: Apache
Last-Modified: Mon, 11 Aug 2014 22:34:05 GMT
ETag: "10240-0-5006227053140;500622334a140”
Accept-Ranges: bytes

$ curl -i http://172.30.45.101/latest/meta-data
HTTP/1.1 404 Not Found
Date: Mon, 25 Aug 2014 15:54:25 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 214
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /latest/meta-data was not found on this server.</p>
</body></html>

$ curl -i http://172.30.45.101/latest/meta-data/
HTTP/1.1 200 OK
Date: Mon, 25 Aug 2014 15:54:32 GMT
Server: Apache
Last-Modified: Mon, 11 Aug 2014 22:34:05 GMT
ETag: "1024a-88-5006227053140;500622334a140"
Accept-Ranges: bytes
Content-Length: 136

service-offering
availability-zone
local-ipv4
local-hostname
public-ipv4
public-hostname
instance-id
vm-id
public-keys
cloud-identifier

$ curl -i http://172.30.45.101/latest/meta-data/local-ipv4; echo
HTTP/1.1 200 OK
Date: Mon, 25 Aug 2014 15:55:39 GMT
Server: Apache
Last-Modified: Mon, 11 Aug 2014 22:34:05 GMT
ETag: "10250-d-5006227053140;500622334a140"
Accept-Ranges: bytes
Content-Length: 13

172.30.45.123

$ curl -i http://172.30.45.101/latest/meta-data/local-ipv4/; echo
HTTP/1.1 404 Not Found
Date: Mon, 25 Aug 2014 15:55:45 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 232
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /metadata/172.30.45.123/local-ipv4/ was not found on this server.</p>
</body></html>


On AWS EC2

$ curl -I  http://169.254.169.254/latest/user-data
HTTP/1.0 200 OK
Content-Type: application/octet-stream
Accept-Ranges: bytes
ETag: "590463714"
Last-Modified: Thu, 03 Apr 2014 23:10:13 GMT
Content-Length: 4790
Connection: close
Date: Mon, 25 Aug 2014 15:57:15 GMT
Server: EC2ws

$ curl -I  http://169.254.169.254/latest/user-data/
HTTP/1.0 200 OK
Content-Type: application/octet-stream
Accept-Ranges: bytes
ETag: "590463714"
Last-Modified: Thu, 03 Apr 2014 23:10:13 GMT
Content-Length: 4790
Connection: close
Date: Mon, 25 Aug 2014 15:57:20 GMT
Server: EC2ws

$ curl -i http://169.254.169.254/latest/meta-data
HTTP/1.0 301 Moved Permanently
Location: http://169.254.169.254/latest/meta-data/
Content-Length: 0
Connection: close
Date: Mon, 25 Aug 2014 15:58:00 GMT
Server: EC2ws

$ curl -i http://169.254.169.254/latest/meta-data/; echo
HTTP/1.0 200 OK
Content-Type: text/plain
Accept-Ranges: bytes
ETag: "1606042795"
Last-Modified: Thu, 03 Apr 2014 23:10:13 GMT
Content-Length: 268
Connection: close
Date: Mon, 25 Aug 2014 15:58:50 GMT
Server: EC2ws

ami-id
ami-launch-index
ami-manifest-path
block-device-mapping/
hostname
iam/
instance-action
instance-id
instance-type
kernel-id
local-hostname
local-ipv4
mac
metrics/
network/
placement/
profile
public-hostname
public-ipv4
public-keys/
reservation-id
security-groups

$ curl -i http://169.254.169.254/latest/meta-data/local-ipv4; echo
HTTP/1.0 200 OK
Content-Type: text/plain
Accept-Ranges: bytes
ETag: "916027669"
Last-Modified: Thu, 03 Apr 2014 23:10:13 GMT
Content-Length: 12
Connection: close
Date: Mon, 25 Aug 2014 16:00:32 GMT
Server: EC2ws

10.250.5.124
$ curl -i http://169.254.169.254/latest/meta-data/local-ipv4/; echo
HTTP/1.0 200 OK
Content-Type: text/plain
Accept-Ranges: bytes
ETag: "916027669"
Last-Modified: Thu, 03 Apr 2014 23:10:13 GMT
Content-Length: 12
Connection: close
Date: Mon, 25 Aug 2014 16:00:36 GMT
Server: EC2ws

10.250.5.124


> ec2 metadata service requires trailing / for listing items
> ----------------------------------------------------------
>
>                 Key: CLOUDSTACK-7405
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7405
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: AWSAPI
>            Reporter: Scott Moser
>            Priority: Minor
>
> This came to me through bug reports to cloud-init:
>  https://bugs.launchpad.net/cloud-init/+bug/1356855
> and
>  https://bugs.launchpad.net/cloud-init/+bug/1311107
> Apparently, the EC2 metadata service that cloudstack provides returns a 404 for "dictionary"
entries that do not have a trailing /.
> Example (as reported to me, i have no first hand experience).
> $ wget http://169.254.169.254/latest/meta-data ;
> 404
> $ wget http://169.254.169.254/latest/meta-data/
> $ cat index.html ; echo
> ami-id
> ami-launch-index
> ami-manifest-path
> block-device-mapping/
> hostname
> instance-action
> instance-id
> instance-type
> local-hostname
> local-ipv4
> mac
> metrics/
> network/
> placement/
> profile
> public-hostname
> public-ipv4
> public-keys/
> reservation-id
> security-groups
> services/
>   



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message