coreos-cloudinit problems

45 views
Skip to first unread message

Alexander Miroch

unread,
Aug 15, 2017, 4:23:53 AM8/15/17
to CoreOS User
Hello,

Although coreos-cloudinit is deprecated, it is installed by default if I deploy the system as Amazon Instance.

# coreos-install -d /dev/sda -C stable -o ami


Cloudinit then is unable to fetch metadata

The messages in log:
Checking availability of "ec2-metadata-service"
Checking availability of "ec2-metadata-service"
Checking availability of "ec2-metadata-service"
Checking availability of "ec2-metadata-service"
...
No datasources available in time

I tried to run it manually
# coreos-cloudinit --from-ec2-metadata=http://169.254.169.254/
and
# coreos-cloudinit  --oem=ec2-compat

The result is the same.

Cloudinit sends these requests:
GET /2009-04-04/ HTTP/1.1
Host: 169.254.169.254
User-Agent: Go-http-client/1.1
Accept-Encoding: gzip

And our metadata server, which is declared as "Amazon-compatible", responds:

HTTP/1.1 404 Not Found
Date: Tue, 15 Aug 2017 08:11:02 GMT
Server: metap2
Connection: close
Content-Length: 32
Content-Type: text/html

404 - File Not Found: Not found


So, the question is, why  the request is "GET /2009-04-04/"  and not "GET /2009-04-04/metadata" ?
The later request returns valid response.

Thank you,












Alex Crawford

unread,
Aug 17, 2017, 3:53:34 PM8/17/17
to Alexander Miroch, CoreOS User
On 08/15, Alexander Miroch wrote:
> Cloudinit sends these requests:
> GET /2009-04-04/ HTTP/1.1
> Host: 169.254.169.254
> User-Agent: Go-http-client/1.1
> Accept-Encoding: gzip
>
> And our metadata server, which is declared as "Amazon-compatible", responds:
>
> HTTP/1.1 404 Not Found
> Date: Tue, 15 Aug 2017 08:11:02 GMT
> Server: metap2
> Connection: close
> Content-Length: 32
> Content-Type: text/html
>
> 404 - File Not Found: Not found
>
>
> So, the question is, why the request is "GET /2009-04-04/" and not "GET
> /2009-04-04/metadata" ?
> The later request returns valid response.

The path was chosen arbitrarily. EC2's metadata service will return a
200 with a directory listing.

As you are aware, coreos-cloudinit is deprecated. Have you tried using
Ignition? It might suffer from the exact same problem, but we could
probably fix that easily enough.

-Alex
signature.asc
Reply all
Reply to author
Forward
0 new messages