-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add AWS IMDSv2 mode support for ignition and afterburn #220
Comments
Thank you for raising this issue. There seems to be an upstream ignition bug report with accompanying patch which we will investigate. |
Additionally, IMDSv2 requires fetching an access token required to access the metadata, see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html . |
Hey @t-lo any updates here? We are waiting for this to switch to IMDSv2 🙏 |
The current date is so old that it leads to errors in some cases. See flatcar/Flatcar#220 and coreos/ignition#989
The metadata version seems to be mostly a red-herring. I've filed a PR for updating it so that we don't let it distract us from actual problems, but I think it will make zero difference for the issue reported here. The actual issue is the token that needs to be passed, as Thilo mentioned. This was added upstream here: coreos/ignition#1154 (which probably requires the SDK update from: coreos/ignition#980) |
Hello, I have tested this with Flatcar 2765.2.6 and facing the issues described above. Is there a plan to update Ignition to support IMDSv2? |
@tormath1 could we add a test for IMDSv1/IMDSv2 in kola while we're still missing support for this? This would be covered by migrating to ignition v3 (#387), and there is an interim PR here flatcar/ignition#32. |
Hi there. I'm currently testing
The alpha version include ignition 2 which supports IMDSv2 natively -> flatcar/ignition#32 (comment)
But the coreos-metadata service still has some issues, if token is required.
This confuse me, since afterburn supports IMDSv2 - coreos/afterburn#305 Luckly, machines will not longer stay in emergency mode, but I'm unable to login into SSH, since Edit: Turns out that the Afterburn version is to old.
Looking at coreos/afterburn@0ed679e, v4.4.1 is the first version that support IMDSv2. @jepio Any plans to bump Afterburn like ignition on alpha, too? |
Yes definitely, that is planned. I would expect it to happen before ignition v3 hits stable. |
@jepio I had a look to AWS API: by default, metadata request supports both version (1 and 2) and new afterburn defaults to v2 and fallback to v1 in case of failure. |
We can close this now as the afterburn update is done flatcar-archive/coreos-overlay#1769 |
@pothos Do you have a timeline on when this is going to stable ? |
The Alpha release 3227.0.0 has all the changes and will need some time until it gets into Beta and then Stable. There was a new major Stable release just now, so it's probably the next Stable in a month or so. |
Thanks :) |
@pothos I tried the
Full journal log can be found here. Maybe this issue should be reopened. |
Right, coreos-cloudinit support wasn't done and while not in the title it was meant to be part of this GitHub issue. Since we closed this I think it's worth opening a new issue for coreos-cloudinit. |
Description
Booting Flatcar Stable (
075585003325/Flatcar-stable-2605.6.0-hvm
) (or even Alpha075585003325/Flatcar-alpha-2661.0.0-hvm
) in AWS on an instance with IMDSv2 turned on causescoreos-metadata
(or itsignition
friend) to exit, which causes#cloud-config
to not execute, potentially locking the user out of the instanceImpact
Instances enter "Emergency Mode", which means no ssh access, nor SSM, and generally the instance is orphaned
Environment and steps to reproduce
Set-up: please see below
Task: booting
Action(s):
Error: [describe the error that was triggered]
Expected behavior
The instance should honor the EC2 KeyName parameter, and/or the
ssh_authorized_keys: []
, and/or run theunits:
specified in#cloud-config
Additional information
The docs point to container-linux-config-transpiler whose repo is marched "archived," but the supported data by provider page cites the
coreos-metadata
repo (which is the process in journalctl on stable that fails, not ignition) but that repo redirects tocoreos/afterburn
which, helpfully, does seem to support IMDSv2As an aside, I actually can't tell if this is my fault for attempting to use practically a standard or if it's because I haven't run my UserData through some kind of yaml-to-json compiler first. It's similarly confusing to have docs that say do not use
#cloud-config
but the reference CloudFormation stack still says#cloud-config
Reproduction Steps
I took the suggested stack, used AWS's "hello world VPC" as a substack just to boot up an instance with IMDSv2 to demonstrate what's going on; the interesting bits are:
where
flatcar-alpha-hvm.yaml
is:The text was updated successfully, but these errors were encountered: