Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AWS metadata version #989

Closed
jhmartin opened this issue May 27, 2020 · 8 comments · Fixed by #993 or #980
Closed

Update AWS metadata version #989

jhmartin opened this issue May 27, 2020 · 8 comments · Fixed by #993 or #980
Assignees
Labels
jira for syncing to jira platform/aws

Comments

@jhmartin
Copy link

jhmartin commented May 27, 2020

Feature Request

Environment

AWS

Desired Feature

Path: "2009-04-04/user-data",
references the 2009 version of the AWS metadata, while https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html indicates current is 2016-09-02. To keep current I suggest updating to the latest version.

@lucab
Copy link
Contributor

lucab commented May 28, 2020

Thanks for the report. Is there anything that you need that actively require a more recent version? Or is there any planned active deprecation that we may have missed? In other words, is this version-bump request part of a larger picture?

@jhmartin
Copy link
Author

jhmartin commented May 28, 2020

It came up in a support case w/AWS whereby the 169.254.169.254 node metadata service was returning 404's. While this was not the cause, during the discussion support suggested updating to the newer version. Being on the recent version could remove that as a concern during future support cases.

@zonggen
Copy link
Member

zonggen commented Jun 2, 2020

The endpoint 2009-04-04/user-data doesn't seem to exist.. is this supposed to be 2009-04-04/meta-data or am I missing something? @lucab

latest[core ~]$ curl http://169.254.169.254/2009-04-04
dynamic
meta-data

user-data[core ~]$ curl http://169.254.169.254/2009-04-04/user-data
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>404 - Not Found</title>
 </head>
 <body>
  <h1>404 - Not Found</h1>
 </body>
</html>

@lucab
Copy link
Contributor

lucab commented Jun 2, 2020

@zonggen I'm not sure, but that seems strange, see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-add-user-data.html. Are you maybe checking on a IMDSv2-only instance?

@sohankunkerkar
Copy link
Member

The endpoint 2009-04-04/user-data doesn't seem to exist.. is this supposed to be 2009-04-04/meta-data or am I missing something? @lucab

latest[core ~]$ curl http://169.254.169.254/2009-04-04
dynamic
meta-data

I think you can see the user-data when you curl http://169.254.169.254/2009-04-04

$ curl http://169.254.169.254/2009-04-04
dynamic
meta-data
user-data

Yeah, I agree with this one. Even I'm seeing the same result.

user-data[core ~]$ curl http://169.254.169.254/2009-04-04/user-data

<title>404 - Not Found</title>

404 - Not Found

@zonggen
Copy link
Member

zonggen commented Jun 2, 2020

Sorry for creating noise on this thread. It turns out that I have to specify --user-data when initializing the instance, otherwise the endpoint is not available.

xref: https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html#synopsis

@sohankunkerkar
Copy link
Member

sohankunkerkar commented Jun 3, 2020

It looks like this data is pretty old. If I query the ec2 control plane now, I see the following information.

$ TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` \
> && curl -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/
1.0
2007-01-19
2007-03-01
2007-08-29
2007-10-10
2007-12-15
2008-02-01
2008-09-01
2009-04-04
2011-01-01
2011-05-01
2012-01-12
2014-02-25
2014-11-05
2015-10-20
2016-04-19
2016-06-30
2016-09-02
2018-03-28
2018-08-17
2018-09-24
2019-10-01
latest

@sohankunkerkar
Copy link
Member

Discussed with @zonggen, it seems like he's working on updating the metadata for aferburn repo. I don't see anyone claiming this issue, so let me ahead and assign it to myself.

@sohankunkerkar sohankunkerkar self-assigned this Jun 3, 2020
sohankunkerkar added a commit to sohankunkerkar/ignition that referenced this issue Jun 3, 2020
@sohankunkerkar sohankunkerkar added the jira for syncing to jira label Jun 4, 2020
@sohankunkerkar sohankunkerkar linked a pull request Jun 4, 2020 that will close this issue
margamanterola pushed a commit to flatcar/ignition that referenced this issue Jan 4, 2021
The current date is so old that it leads to errors in some cases.

See flatcar/Flatcar#220 and
coreos/ignition#989
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira for syncing to jira platform/aws
Projects
None yet
4 participants